1
'------------------------------------------------------------------------------
3 ' This code was generated by a tool.
4 ' Runtime Version:2.0.50727.4927
6 ' Changes to this file may cause incorrect behavior and will be lost if
7 ' the code is regenerated.
9 '------------------------------------------------------------------------------
17 '''Represents a strongly typed in-memory cache of data.
19 <Global.System
.CodeDom
.Compiler
.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
20 Global.System
.Serializable(), _
21 Global.System
.ComponentModel
.DesignerCategoryAttribute("code"), _
22 Global.System
.ComponentModel
.ToolboxItem(true), _
23 Global.System
.Xml
.Serialization
.XmlSchemaProviderAttribute("GetTypedDataSetSchema"), _
24 Global.System
.Xml
.Serialization
.XmlRootAttribute("SQLServer2005DBDataSet"), _
25 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.DataSet")> _
26 Partial
Public Class SQLServer2005DBDataSet
27 Inherits
Global.System
.Data
.DataSet
29 Private tableCourse
As CourseDataTable
31 Private tableCourseGrade
As CourseGradeDataTable
33 Private tableCourseInstructor
As CourseInstructorDataTable
35 Private tableDepartment
As DepartmentDataTable
37 Private tableOfficeAssignment
As OfficeAssignmentDataTable
39 Private tableOnlineCourse
As OnlineCourseDataTable
41 Private tableOnsiteCourse
As OnsiteCourseDataTable
43 Private tablePerson
As PersonDataTable
45 Private relationFK_Course_Department
As Global.System
.Data
.DataRelation
47 Private relationFK_CourseGrade_Course
As Global.System
.Data
.DataRelation
49 Private relationFK_CourseGrade_Student
As Global.System
.Data
.DataRelation
51 Private relationFK_CourseInstructor_Course
As Global.System
.Data
.DataRelation
53 Private relationFK_CourseInstructor_Person
As Global.System
.Data
.DataRelation
55 Private relationFK_OfficeAssignment_Person
As Global.System
.Data
.DataRelation
57 Private relationFK_OnlineCourse_Course
As Global.System
.Data
.DataRelation
59 Private relationFK_OnsiteCourse_Course
As Global.System
.Data
.DataRelation
61 Private _schemaSerializationMode
As Global.System
.Data
.SchemaSerializationMode
= Global.System
.Data
.SchemaSerializationMode
.IncludeSchema
63 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
68 Dim schemaChangedHandler
As Global.System
.ComponentModel
.CollectionChangeEventHandler
= AddressOf
Me.SchemaChanged
69 AddHandler MyBase
.Tables
.CollectionChanged
, schemaChangedHandler
70 AddHandler MyBase
.Relations
.CollectionChanged
, schemaChangedHandler
74 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
75 Protected
Sub New(ByVal info
As Global.System
.Runtime
.Serialization
.SerializationInfo
, ByVal context
As Global.System
.Runtime
.Serialization
.StreamingContext
)
76 MyBase
.New(info
, context
, false)
77 If (Me.IsBinarySerialized(info
, context
) = true) Then
79 Dim schemaChangedHandler1
As Global.System
.ComponentModel
.CollectionChangeEventHandler
= AddressOf
Me.SchemaChanged
80 AddHandler
Me.Tables
.CollectionChanged
, schemaChangedHandler1
81 AddHandler
Me.Relations
.CollectionChanged
, schemaChangedHandler1
84 Dim strSchema
As String = CType(info
.GetValue("XmlSchema", GetType(String)),String)
85 If (Me.DetermineSchemaSerializationMode(info
, context
) = Global.System
.Data
.SchemaSerializationMode
.IncludeSchema
) Then
86 Dim ds
As Global.System
.Data
.DataSet
= New Global.System
.Data
.DataSet
87 ds
.ReadXmlSchema(New Global.System
.Xml
.XmlTextReader(New Global.System
.IO
.StringReader(strSchema
)))
88 If (Not (ds
.Tables("Course")) Is
Nothing) Then
89 MyBase
.Tables
.Add(New CourseDataTable(ds
.Tables("Course")))
91 If (Not (ds
.Tables("CourseGrade")) Is
Nothing) Then
92 MyBase
.Tables
.Add(New CourseGradeDataTable(ds
.Tables("CourseGrade")))
94 If (Not (ds
.Tables("CourseInstructor")) Is
Nothing) Then
95 MyBase
.Tables
.Add(New CourseInstructorDataTable(ds
.Tables("CourseInstructor")))
97 If (Not (ds
.Tables("Department")) Is
Nothing) Then
98 MyBase
.Tables
.Add(New DepartmentDataTable(ds
.Tables("Department")))
100 If (Not (ds
.Tables("OfficeAssignment")) Is
Nothing) Then
101 MyBase
.Tables
.Add(New OfficeAssignmentDataTable(ds
.Tables("OfficeAssignment")))
103 If (Not (ds
.Tables("OnlineCourse")) Is
Nothing) Then
104 MyBase
.Tables
.Add(New OnlineCourseDataTable(ds
.Tables("OnlineCourse")))
106 If (Not (ds
.Tables("OnsiteCourse")) Is
Nothing) Then
107 MyBase
.Tables
.Add(New OnsiteCourseDataTable(ds
.Tables("OnsiteCourse")))
109 If (Not (ds
.Tables("Person")) Is
Nothing) Then
110 MyBase
.Tables
.Add(New PersonDataTable(ds
.Tables("Person")))
112 Me.DataSetName
= ds
.DataSetName
113 Me.Prefix
= ds
.Prefix
114 Me.Namespace
= ds
.Namespace
115 Me.Locale
= ds
.Locale
116 Me.CaseSensitive
= ds
.CaseSensitive
117 Me.EnforceConstraints
= ds
.EnforceConstraints
118 Me.Merge(ds
, false, Global.System
.Data
.MissingSchemaAction
.Add
)
121 Me.ReadXmlSchema(New Global.System
.Xml
.XmlTextReader(New Global.System
.IO
.StringReader(strSchema
)))
123 Me.GetSerializationData(info
, context
)
124 Dim schemaChangedHandler
As Global.System
.ComponentModel
.CollectionChangeEventHandler
= AddressOf
Me.SchemaChanged
125 AddHandler MyBase
.Tables
.CollectionChanged
, schemaChangedHandler
126 AddHandler
Me.Relations
.CollectionChanged
, schemaChangedHandler
129 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
130 Global.System
.ComponentModel
.Browsable(false), _
131 Global.System
.ComponentModel
.DesignerSerializationVisibility(Global.System
.ComponentModel
.DesignerSerializationVisibility
.Content
)> _
132 Public ReadOnly
Property Course() As CourseDataTable
134 Return Me.tableCourse
138 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
139 Global.System
.ComponentModel
.Browsable(false), _
140 Global.System
.ComponentModel
.DesignerSerializationVisibility(Global.System
.ComponentModel
.DesignerSerializationVisibility
.Content
)> _
141 Public ReadOnly
Property CourseGrade() As CourseGradeDataTable
143 Return Me.tableCourseGrade
147 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
148 Global.System
.ComponentModel
.Browsable(false), _
149 Global.System
.ComponentModel
.DesignerSerializationVisibility(Global.System
.ComponentModel
.DesignerSerializationVisibility
.Content
)> _
150 Public ReadOnly
Property CourseInstructor() As CourseInstructorDataTable
152 Return Me.tableCourseInstructor
156 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
157 Global.System
.ComponentModel
.Browsable(false), _
158 Global.System
.ComponentModel
.DesignerSerializationVisibility(Global.System
.ComponentModel
.DesignerSerializationVisibility
.Content
)> _
159 Public ReadOnly
Property Department() As DepartmentDataTable
161 Return Me.tableDepartment
165 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
166 Global.System
.ComponentModel
.Browsable(false), _
167 Global.System
.ComponentModel
.DesignerSerializationVisibility(Global.System
.ComponentModel
.DesignerSerializationVisibility
.Content
)> _
168 Public ReadOnly
Property OfficeAssignment() As OfficeAssignmentDataTable
170 Return Me.tableOfficeAssignment
174 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
175 Global.System
.ComponentModel
.Browsable(false), _
176 Global.System
.ComponentModel
.DesignerSerializationVisibility(Global.System
.ComponentModel
.DesignerSerializationVisibility
.Content
)> _
177 Public ReadOnly
Property OnlineCourse() As OnlineCourseDataTable
179 Return Me.tableOnlineCourse
183 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
184 Global.System
.ComponentModel
.Browsable(false), _
185 Global.System
.ComponentModel
.DesignerSerializationVisibility(Global.System
.ComponentModel
.DesignerSerializationVisibility
.Content
)> _
186 Public ReadOnly
Property OnsiteCourse() As OnsiteCourseDataTable
188 Return Me.tableOnsiteCourse
192 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
193 Global.System
.ComponentModel
.Browsable(false), _
194 Global.System
.ComponentModel
.DesignerSerializationVisibility(Global.System
.ComponentModel
.DesignerSerializationVisibility
.Content
)> _
195 Public ReadOnly
Property Person() As PersonDataTable
197 Return Me.tablePerson
201 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
202 Global.System
.ComponentModel
.BrowsableAttribute(true), _
203 Global.System
.ComponentModel
.DesignerSerializationVisibilityAttribute(Global.System
.ComponentModel
.DesignerSerializationVisibility
.Visible
)> _
204 Public Overrides
Property SchemaSerializationMode() As Global.System
.Data
.SchemaSerializationMode
206 Return Me._schemaSerializationMode
209 Me._schemaSerializationMode
= value
213 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
214 Global.System
.ComponentModel
.DesignerSerializationVisibilityAttribute(Global.System
.ComponentModel
.DesignerSerializationVisibility
.Hidden
)> _
215 Public Shadows ReadOnly
Property Tables() As Global.System
.Data
.DataTableCollection
221 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
222 Global.System
.ComponentModel
.DesignerSerializationVisibilityAttribute(Global.System
.ComponentModel
.DesignerSerializationVisibility
.Hidden
)> _
223 Public Shadows ReadOnly
Property Relations() As Global.System
.Data
.DataRelationCollection
225 Return MyBase
.Relations
229 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
230 Protected Overrides
Sub InitializeDerivedDataSet()
236 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
237 Public Overrides
Function Clone() As Global.System
.Data
.DataSet
238 Dim cln
As SQLServer2005DBDataSet
= CType(MyBase
.Clone
,SQLServer2005DBDataSet
)
240 cln
.SchemaSerializationMode
= Me.SchemaSerializationMode
244 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
245 Protected Overrides
Function ShouldSerializeTables() As Boolean
249 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
250 Protected Overrides
Function ShouldSerializeRelations() As Boolean
254 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
255 Protected Overrides
Sub ReadXmlSerializable(ByVal reader
As Global.System
.Xml
.XmlReader
)
256 If (Me.DetermineSchemaSerializationMode(reader
) = Global.System
.Data
.SchemaSerializationMode
.IncludeSchema
) Then
258 Dim ds
As Global.System
.Data
.DataSet
= New Global.System
.Data
.DataSet
260 If (Not (ds
.Tables("Course")) Is
Nothing) Then
261 MyBase
.Tables
.Add(New CourseDataTable(ds
.Tables("Course")))
263 If (Not (ds
.Tables("CourseGrade")) Is
Nothing) Then
264 MyBase
.Tables
.Add(New CourseGradeDataTable(ds
.Tables("CourseGrade")))
266 If (Not (ds
.Tables("CourseInstructor")) Is
Nothing) Then
267 MyBase
.Tables
.Add(New CourseInstructorDataTable(ds
.Tables("CourseInstructor")))
269 If (Not (ds
.Tables("Department")) Is
Nothing) Then
270 MyBase
.Tables
.Add(New DepartmentDataTable(ds
.Tables("Department")))
272 If (Not (ds
.Tables("OfficeAssignment")) Is
Nothing) Then
273 MyBase
.Tables
.Add(New OfficeAssignmentDataTable(ds
.Tables("OfficeAssignment")))
275 If (Not (ds
.Tables("OnlineCourse")) Is
Nothing) Then
276 MyBase
.Tables
.Add(New OnlineCourseDataTable(ds
.Tables("OnlineCourse")))
278 If (Not (ds
.Tables("OnsiteCourse")) Is
Nothing) Then
279 MyBase
.Tables
.Add(New OnsiteCourseDataTable(ds
.Tables("OnsiteCourse")))
281 If (Not (ds
.Tables("Person")) Is
Nothing) Then
282 MyBase
.Tables
.Add(New PersonDataTable(ds
.Tables("Person")))
284 Me.DataSetName
= ds
.DataSetName
285 Me.Prefix
= ds
.Prefix
286 Me.Namespace
= ds
.Namespace
287 Me.Locale
= ds
.Locale
288 Me.CaseSensitive
= ds
.CaseSensitive
289 Me.EnforceConstraints
= ds
.EnforceConstraints
290 Me.Merge(ds
, false, Global.System
.Data
.MissingSchemaAction
.Add
)
298 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
299 Protected Overrides
Function GetSchemaSerializable() As Global.System
.Xml
.Schema
.XmlSchema
300 Dim stream
As Global.System
.IO
.MemoryStream
= New Global.System
.IO
.MemoryStream
301 Me.WriteXmlSchema(New Global.System
.Xml
.XmlTextWriter(stream
, Nothing))
303 Return Global.System
.Xml
.Schema
.XmlSchema
.Read(New Global.System
.Xml
.XmlTextReader(stream
), Nothing)
306 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
307 Friend Overloads
Sub InitVars()
311 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
312 Friend Overloads
Sub InitVars(ByVal initTable
As Boolean)
313 Me.tableCourse
= CType(MyBase
.Tables("Course"),CourseDataTable
)
314 If (initTable
= true) Then
315 If (Not (Me.tableCourse
) Is
Nothing) Then
316 Me.tableCourse
.InitVars
319 Me.tableCourseGrade
= CType(MyBase
.Tables("CourseGrade"),CourseGradeDataTable
)
320 If (initTable
= true) Then
321 If (Not (Me.tableCourseGrade
) Is
Nothing) Then
322 Me.tableCourseGrade
.InitVars
325 Me.tableCourseInstructor
= CType(MyBase
.Tables("CourseInstructor"),CourseInstructorDataTable
)
326 If (initTable
= true) Then
327 If (Not (Me.tableCourseInstructor
) Is
Nothing) Then
328 Me.tableCourseInstructor
.InitVars
331 Me.tableDepartment
= CType(MyBase
.Tables("Department"),DepartmentDataTable
)
332 If (initTable
= true) Then
333 If (Not (Me.tableDepartment
) Is
Nothing) Then
334 Me.tableDepartment
.InitVars
337 Me.tableOfficeAssignment
= CType(MyBase
.Tables("OfficeAssignment"),OfficeAssignmentDataTable
)
338 If (initTable
= true) Then
339 If (Not (Me.tableOfficeAssignment
) Is
Nothing) Then
340 Me.tableOfficeAssignment
.InitVars
343 Me.tableOnlineCourse
= CType(MyBase
.Tables("OnlineCourse"),OnlineCourseDataTable
)
344 If (initTable
= true) Then
345 If (Not (Me.tableOnlineCourse
) Is
Nothing) Then
346 Me.tableOnlineCourse
.InitVars
349 Me.tableOnsiteCourse
= CType(MyBase
.Tables("OnsiteCourse"),OnsiteCourseDataTable
)
350 If (initTable
= true) Then
351 If (Not (Me.tableOnsiteCourse
) Is
Nothing) Then
352 Me.tableOnsiteCourse
.InitVars
355 Me.tablePerson
= CType(MyBase
.Tables("Person"),PersonDataTable
)
356 If (initTable
= true) Then
357 If (Not (Me.tablePerson
) Is
Nothing) Then
358 Me.tablePerson
.InitVars
361 Me.relationFK_Course_Department
= Me.Relations("FK_Course_Department")
362 Me.relationFK_CourseGrade_Course
= Me.Relations("FK_CourseGrade_Course")
363 Me.relationFK_CourseGrade_Student
= Me.Relations("FK_CourseGrade_Student")
364 Me.relationFK_CourseInstructor_Course
= Me.Relations("FK_CourseInstructor_Course")
365 Me.relationFK_CourseInstructor_Person
= Me.Relations("FK_CourseInstructor_Person")
366 Me.relationFK_OfficeAssignment_Person
= Me.Relations("FK_OfficeAssignment_Person")
367 Me.relationFK_OnlineCourse_Course
= Me.Relations("FK_OnlineCourse_Course")
368 Me.relationFK_OnsiteCourse_Course
= Me.Relations("FK_OnsiteCourse_Course")
371 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
372 Private Sub InitClass()
373 Me.DataSetName
= "SQLServer2005DBDataSet"
375 Me.Namespace
= "http://tempuri.org/SQLServer2005DBDataSet1.xsd"
376 Me.EnforceConstraints
= true
377 Me.SchemaSerializationMode
= Global.System
.Data
.SchemaSerializationMode
.IncludeSchema
378 Me.tableCourse
= New CourseDataTable
379 MyBase
.Tables
.Add(Me.tableCourse
)
380 Me.tableCourseGrade
= New CourseGradeDataTable
381 MyBase
.Tables
.Add(Me.tableCourseGrade
)
382 Me.tableCourseInstructor
= New CourseInstructorDataTable
383 MyBase
.Tables
.Add(Me.tableCourseInstructor
)
384 Me.tableDepartment
= New DepartmentDataTable
385 MyBase
.Tables
.Add(Me.tableDepartment
)
386 Me.tableOfficeAssignment
= New OfficeAssignmentDataTable
387 MyBase
.Tables
.Add(Me.tableOfficeAssignment
)
388 Me.tableOnlineCourse
= New OnlineCourseDataTable
389 MyBase
.Tables
.Add(Me.tableOnlineCourse
)
390 Me.tableOnsiteCourse
= New OnsiteCourseDataTable
391 MyBase
.Tables
.Add(Me.tableOnsiteCourse
)
392 Me.tablePerson
= New PersonDataTable
393 MyBase
.Tables
.Add(Me.tablePerson
)
394 Me.relationFK_Course_Department
= New Global.System
.Data
.DataRelation("FK_Course_Department", New Global.System
.Data
.DataColumn() {Me.tableDepartment
.DepartmentIDColumn
}, New Global.System
.Data
.DataColumn() {Me.tableCourse
.DepartmentIDColumn
}, false)
395 Me.Relations
.Add(Me.relationFK_Course_Department
)
396 Me.relationFK_CourseGrade_Course
= New Global.System
.Data
.DataRelation("FK_CourseGrade_Course", New Global.System
.Data
.DataColumn() {Me.tableCourse
.CourseIDColumn
}, New Global.System
.Data
.DataColumn() {Me.tableCourseGrade
.CourseIDColumn
}, false)
397 Me.Relations
.Add(Me.relationFK_CourseGrade_Course
)
398 Me.relationFK_CourseGrade_Student
= New Global.System
.Data
.DataRelation("FK_CourseGrade_Student", New Global.System
.Data
.DataColumn() {Me.tablePerson
.PersonIDColumn
}, New Global.System
.Data
.DataColumn() {Me.tableCourseGrade
.StudentIDColumn
}, false)
399 Me.Relations
.Add(Me.relationFK_CourseGrade_Student
)
400 Me.relationFK_CourseInstructor_Course
= New Global.System
.Data
.DataRelation("FK_CourseInstructor_Course", New Global.System
.Data
.DataColumn() {Me.tableCourse
.CourseIDColumn
}, New Global.System
.Data
.DataColumn() {Me.tableCourseInstructor
.CourseIDColumn
}, false)
401 Me.Relations
.Add(Me.relationFK_CourseInstructor_Course
)
402 Me.relationFK_CourseInstructor_Person
= New Global.System
.Data
.DataRelation("FK_CourseInstructor_Person", New Global.System
.Data
.DataColumn() {Me.tablePerson
.PersonIDColumn
}, New Global.System
.Data
.DataColumn() {Me.tableCourseInstructor
.PersonIDColumn
}, false)
403 Me.Relations
.Add(Me.relationFK_CourseInstructor_Person
)
404 Me.relationFK_OfficeAssignment_Person
= New Global.System
.Data
.DataRelation("FK_OfficeAssignment_Person", New Global.System
.Data
.DataColumn() {Me.tablePerson
.PersonIDColumn
}, New Global.System
.Data
.DataColumn() {Me.tableOfficeAssignment
.InstructorIDColumn
}, false)
405 Me.Relations
.Add(Me.relationFK_OfficeAssignment_Person
)
406 Me.relationFK_OnlineCourse_Course
= New Global.System
.Data
.DataRelation("FK_OnlineCourse_Course", New Global.System
.Data
.DataColumn() {Me.tableCourse
.CourseIDColumn
}, New Global.System
.Data
.DataColumn() {Me.tableOnlineCourse
.CourseIDColumn
}, false)
407 Me.Relations
.Add(Me.relationFK_OnlineCourse_Course
)
408 Me.relationFK_OnsiteCourse_Course
= New Global.System
.Data
.DataRelation("FK_OnsiteCourse_Course", New Global.System
.Data
.DataColumn() {Me.tableCourse
.CourseIDColumn
}, New Global.System
.Data
.DataColumn() {Me.tableOnsiteCourse
.CourseIDColumn
}, false)
409 Me.Relations
.Add(Me.relationFK_OnsiteCourse_Course
)
412 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
413 Private Function ShouldSerializeCourse() As Boolean
417 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
418 Private Function ShouldSerializeCourseGrade() As Boolean
422 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
423 Private Function ShouldSerializeCourseInstructor() As Boolean
427 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
428 Private Function ShouldSerializeDepartment() As Boolean
432 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
433 Private Function ShouldSerializeOfficeAssignment() As Boolean
437 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
438 Private Function ShouldSerializeOnlineCourse() As Boolean
442 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
443 Private Function ShouldSerializeOnsiteCourse() As Boolean
447 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
448 Private Function ShouldSerializePerson() As Boolean
452 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
453 Private Sub SchemaChanged(ByVal sender
As Object, ByVal e
As Global.System
.ComponentModel
.CollectionChangeEventArgs
)
454 If (e
.Action
= Global.System
.ComponentModel
.CollectionChangeAction
.Remove) Then
459 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
460 Public Shared
Function GetTypedDataSetSchema(ByVal xs
As Global.System
.Xml
.Schema
.XmlSchemaSet
) As Global.System
.Xml
.Schema
.XmlSchemaComplexType
461 Dim ds
As SQLServer2005DBDataSet
= New SQLServer2005DBDataSet
462 Dim type As Global.System
.Xml
.Schema
.XmlSchemaComplexType
= New Global.System
.Xml
.Schema
.XmlSchemaComplexType
463 Dim sequence
As Global.System
.Xml
.Schema
.XmlSchemaSequence
= New Global.System
.Xml
.Schema
.XmlSchemaSequence
464 Dim any
As Global.System
.Xml
.Schema
.XmlSchemaAny
= New Global.System
.Xml
.Schema
.XmlSchemaAny
465 any
.Namespace
= ds
.Namespace
466 sequence
.Items
.Add(any
)
467 type.Particle
= sequence
468 Dim dsSchema
As Global.System
.Xml
.Schema
.XmlSchema
= ds
.GetSchemaSerializable
469 If xs
.Contains(dsSchema
.TargetNamespace
) Then
470 Dim s1
As Global.System
.IO
.MemoryStream
= New Global.System
.IO
.MemoryStream
471 Dim s2
As Global.System
.IO
.MemoryStream
= New Global.System
.IO
.MemoryStream
473 Dim schema
As Global.System
.Xml
.Schema
.XmlSchema
= Nothing
475 Dim schemas
As Global.System
.Collections
.IEnumerator
= xs
.Schemas(dsSchema
.TargetNamespace
).GetEnumerator
476 Do While schemas
.MoveNext
477 schema
= CType(schemas
.Current
,Global.System
.Xml
.Schema
.XmlSchema
)
480 If (s1
.Length
= s2
.Length
) Then
484 Do While ((s1
.Position
<> s1
.Length
) _
485 AndAlso (s1
.ReadByte
= s2
.ReadByte
))
489 If (s1
.Position
= s1
.Length
) Then
496 If (Not (s1
) Is
Nothing) Then
499 If (Not (s2
) Is
Nothing) Then
508 Public Delegate
Sub CourseRowChangeEventHandler(ByVal sender
As Object, ByVal e
As CourseRowChangeEvent
)
510 Public Delegate
Sub CourseGradeRowChangeEventHandler(ByVal sender
As Object, ByVal e
As CourseGradeRowChangeEvent
)
512 Public Delegate
Sub CourseInstructorRowChangeEventHandler(ByVal sender
As Object, ByVal e
As CourseInstructorRowChangeEvent
)
514 Public Delegate
Sub DepartmentRowChangeEventHandler(ByVal sender
As Object, ByVal e
As DepartmentRowChangeEvent
)
516 Public Delegate
Sub OfficeAssignmentRowChangeEventHandler(ByVal sender
As Object, ByVal e
As OfficeAssignmentRowChangeEvent
)
518 Public Delegate
Sub OnlineCourseRowChangeEventHandler(ByVal sender
As Object, ByVal e
As OnlineCourseRowChangeEvent
)
520 Public Delegate
Sub OnsiteCourseRowChangeEventHandler(ByVal sender
As Object, ByVal e
As OnsiteCourseRowChangeEvent
)
522 Public Delegate
Sub PersonRowChangeEventHandler(ByVal sender
As Object, ByVal e
As PersonRowChangeEvent
)
525 '''Represents the strongly named DataTable class.
527 <Global.System
.CodeDom
.Compiler
.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
528 Global.System
.Serializable(), _
529 Global.System
.Xml
.Serialization
.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
530 Partial
Public Class CourseDataTable
531 Inherits
Global.System
.Data
.TypedTableBase(Of CourseRow
)
533 Private columnCourseID
As Global.System
.Data
.DataColumn
535 Private columnTitle
As Global.System
.Data
.DataColumn
537 Private columnCredits
As Global.System
.Data
.DataColumn
539 Private columnDepartmentID
As Global.System
.Data
.DataColumn
541 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
544 Me.TableName
= "Course"
550 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
551 Friend Sub New(ByVal table
As Global.System
.Data
.DataTable
)
553 Me.TableName
= table
.TableName
554 If (table
.CaseSensitive
<> table
.DataSet
.CaseSensitive
) Then
555 Me.CaseSensitive
= table
.CaseSensitive
557 If (table
.Locale
.ToString
<> table
.DataSet
.Locale
.ToString
) Then
558 Me.Locale
= table
.Locale
560 If (table
.Namespace
<> table
.DataSet
.Namespace
) Then
561 Me.Namespace
= table
.Namespace
563 Me.Prefix
= table
.Prefix
564 Me.MinimumCapacity
= table
.MinimumCapacity
567 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
568 Protected
Sub New(ByVal info
As Global.System
.Runtime
.Serialization
.SerializationInfo
, ByVal context
As Global.System
.Runtime
.Serialization
.StreamingContext
)
569 MyBase
.New(info
, context
)
573 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
574 Public ReadOnly
Property CourseIDColumn() As Global.System
.Data
.DataColumn
576 Return Me.columnCourseID
580 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
581 Public ReadOnly
Property TitleColumn() As Global.System
.Data
.DataColumn
583 Return Me.columnTitle
587 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
588 Public ReadOnly
Property CreditsColumn() As Global.System
.Data
.DataColumn
590 Return Me.columnCredits
594 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
595 Public ReadOnly
Property DepartmentIDColumn() As Global.System
.Data
.DataColumn
597 Return Me.columnDepartmentID
601 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
602 Global.System
.ComponentModel
.Browsable(false)> _
603 Public ReadOnly
Property Count() As Integer
609 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
610 Public Default ReadOnly
Property Item(ByVal index
As Integer) As CourseRow
612 Return CType(Me.Rows(index
),CourseRow
)
616 Public Event CourseRowChanging
As CourseRowChangeEventHandler
618 Public Event CourseRowChanged
As CourseRowChangeEventHandler
620 Public Event CourseRowDeleting
As CourseRowChangeEventHandler
622 Public Event CourseRowDeleted
As CourseRowChangeEventHandler
624 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
625 Public Overloads
Sub AddCourseRow(ByVal row
As CourseRow
)
629 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
630 Public Overloads
Function AddCourseRow(ByVal CourseID
As Integer, ByVal Title
As String, ByVal Credits
As Integer, ByVal parentDepartmentRowByFK_Course_Department
As DepartmentRow
) As CourseRow
631 Dim rowCourseRow
As CourseRow
= CType(Me.NewRow
,CourseRow
)
632 Dim columnValuesArray() As Object = New Object() {CourseID
, Title
, Credits
, Nothing}
633 If (Not (parentDepartmentRowByFK_Course_Department
) Is
Nothing) Then
634 columnValuesArray(3) = parentDepartmentRowByFK_Course_Department(0)
636 rowCourseRow
.ItemArray
= columnValuesArray
637 Me.Rows
.Add(rowCourseRow
)
641 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
642 Public Function FindByCourseID(ByVal CourseID
As Integer) As CourseRow
643 Return CType(Me.Rows
.Find(New Object() {CourseID
}),CourseRow
)
646 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
647 Public Overrides
Function Clone() As Global.System
.Data
.DataTable
648 Dim cln
As CourseDataTable
= CType(MyBase
.Clone
,CourseDataTable
)
653 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
654 Protected Overrides
Function CreateInstance() As Global.System
.Data
.DataTable
655 Return New CourseDataTable
658 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
659 Friend Sub InitVars()
660 Me.columnCourseID
= MyBase
.Columns("CourseID")
661 Me.columnTitle
= MyBase
.Columns("Title")
662 Me.columnCredits
= MyBase
.Columns("Credits")
663 Me.columnDepartmentID
= MyBase
.Columns("DepartmentID")
666 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
667 Private Sub InitClass()
668 Me.columnCourseID
= New Global.System
.Data
.DataColumn("CourseID", GetType(Integer), Nothing, Global.System
.Data
.MappingType
.Element
)
669 MyBase
.Columns
.Add(Me.columnCourseID
)
670 Me.columnTitle
= New Global.System
.Data
.DataColumn("Title", GetType(String), Nothing, Global.System
.Data
.MappingType
.Element
)
671 MyBase
.Columns
.Add(Me.columnTitle
)
672 Me.columnCredits
= New Global.System
.Data
.DataColumn("Credits", GetType(Integer), Nothing, Global.System
.Data
.MappingType
.Element
)
673 MyBase
.Columns
.Add(Me.columnCredits
)
674 Me.columnDepartmentID
= New Global.System
.Data
.DataColumn("DepartmentID", GetType(Integer), Nothing, Global.System
.Data
.MappingType
.Element
)
675 MyBase
.Columns
.Add(Me.columnDepartmentID
)
676 Me.Constraints
.Add(New Global.System
.Data
.UniqueConstraint("Constraint1", New Global.System
.Data
.DataColumn() {Me.columnCourseID
}, true))
677 Me.columnCourseID
.AllowDBNull
= false
678 Me.columnCourseID
.Unique
= true
679 Me.columnTitle
.AllowDBNull
= false
680 Me.columnTitle
.MaxLength
= 100
681 Me.columnCredits
.AllowDBNull
= false
682 Me.columnDepartmentID
.AllowDBNull
= false
685 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
686 Public Function NewCourseRow() As CourseRow
687 Return CType(Me.NewRow
,CourseRow
)
690 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
691 Protected Overrides
Function NewRowFromBuilder(ByVal builder
As Global.System
.Data
.DataRowBuilder
) As Global.System
.Data
.DataRow
692 Return New CourseRow(builder
)
695 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
696 Protected Overrides
Function GetRowType() As Global.System
.Type
697 Return GetType(CourseRow
)
700 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
701 Protected Overrides
Sub OnRowChanged(ByVal e
As Global.System
.Data
.DataRowChangeEventArgs
)
702 MyBase
.OnRowChanged(e
)
703 If (Not (Me.CourseRowChangedEvent
) Is
Nothing) Then
704 RaiseEvent CourseRowChanged(Me, New CourseRowChangeEvent(CType(e
.Row
,CourseRow
), e
.Action
))
708 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
709 Protected Overrides
Sub OnRowChanging(ByVal e
As Global.System
.Data
.DataRowChangeEventArgs
)
710 MyBase
.OnRowChanging(e
)
711 If (Not (Me.CourseRowChangingEvent
) Is
Nothing) Then
712 RaiseEvent CourseRowChanging(Me, New CourseRowChangeEvent(CType(e
.Row
,CourseRow
), e
.Action
))
716 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
717 Protected Overrides
Sub OnRowDeleted(ByVal e
As Global.System
.Data
.DataRowChangeEventArgs
)
718 MyBase
.OnRowDeleted(e
)
719 If (Not (Me.CourseRowDeletedEvent
) Is
Nothing) Then
720 RaiseEvent CourseRowDeleted(Me, New CourseRowChangeEvent(CType(e
.Row
,CourseRow
), e
.Action
))
724 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
725 Protected Overrides
Sub OnRowDeleting(ByVal e
As Global.System
.Data
.DataRowChangeEventArgs
)
726 MyBase
.OnRowDeleting(e
)
727 If (Not (Me.CourseRowDeletingEvent
) Is
Nothing) Then
728 RaiseEvent CourseRowDeleting(Me, New CourseRowChangeEvent(CType(e
.Row
,CourseRow
), e
.Action
))
732 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
733 Public Sub RemoveCourseRow(ByVal row
As CourseRow
)
737 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
738 Public Shared
Function GetTypedTableSchema(ByVal xs
As Global.System
.Xml
.Schema
.XmlSchemaSet
) As Global.System
.Xml
.Schema
.XmlSchemaComplexType
739 Dim type As Global.System
.Xml
.Schema
.XmlSchemaComplexType
= New Global.System
.Xml
.Schema
.XmlSchemaComplexType
740 Dim sequence
As Global.System
.Xml
.Schema
.XmlSchemaSequence
= New Global.System
.Xml
.Schema
.XmlSchemaSequence
741 Dim ds
As SQLServer2005DBDataSet
= New SQLServer2005DBDataSet
742 Dim any1
As Global.System
.Xml
.Schema
.XmlSchemaAny
= New Global.System
.Xml
.Schema
.XmlSchemaAny
743 any1
.Namespace
= "http://www.w3.org/2001/XMLSchema"
744 any1
.MinOccurs
= New Decimal(0)
745 any1
.MaxOccurs
= Decimal.MaxValue
746 any1
.ProcessContents
= Global.System
.Xml
.Schema
.XmlSchemaContentProcessing
.Lax
747 sequence
.Items
.Add(any1
)
748 Dim any2
As Global.System
.Xml
.Schema
.XmlSchemaAny
= New Global.System
.Xml
.Schema
.XmlSchemaAny
749 any2
.Namespace
= "urn:schemas-microsoft-com:xml-diffgram-v1"
750 any2
.MinOccurs
= New Decimal(1)
751 any2
.ProcessContents
= Global.System
.Xml
.Schema
.XmlSchemaContentProcessing
.Lax
752 sequence
.Items
.Add(any2
)
753 Dim attribute1
As Global.System
.Xml
.Schema
.XmlSchemaAttribute
= New Global.System
.Xml
.Schema
.XmlSchemaAttribute
754 attribute1
.Name
= "namespace"
755 attribute1
.FixedValue
= ds
.Namespace
756 type.Attributes
.Add(attribute1
)
757 Dim attribute2
As Global.System
.Xml
.Schema
.XmlSchemaAttribute
= New Global.System
.Xml
.Schema
.XmlSchemaAttribute
758 attribute2
.Name
= "tableTypeName"
759 attribute2
.FixedValue
= "CourseDataTable"
760 type.Attributes
.Add(attribute2
)
761 type.Particle
= sequence
762 Dim dsSchema
As Global.System
.Xml
.Schema
.XmlSchema
= ds
.GetSchemaSerializable
763 If xs
.Contains(dsSchema
.TargetNamespace
) Then
764 Dim s1
As Global.System
.IO
.MemoryStream
= New Global.System
.IO
.MemoryStream
765 Dim s2
As Global.System
.IO
.MemoryStream
= New Global.System
.IO
.MemoryStream
767 Dim schema
As Global.System
.Xml
.Schema
.XmlSchema
= Nothing
769 Dim schemas
As Global.System
.Collections
.IEnumerator
= xs
.Schemas(dsSchema
.TargetNamespace
).GetEnumerator
770 Do While schemas
.MoveNext
771 schema
= CType(schemas
.Current
,Global.System
.Xml
.Schema
.XmlSchema
)
774 If (s1
.Length
= s2
.Length
) Then
778 Do While ((s1
.Position
<> s1
.Length
) _
779 AndAlso (s1
.ReadByte
= s2
.ReadByte
))
783 If (s1
.Position
= s1
.Length
) Then
790 If (Not (s1
) Is
Nothing) Then
793 If (Not (s2
) Is
Nothing) Then
804 '''Represents the strongly named DataTable class.
806 <Global.System
.CodeDom
.Compiler
.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
807 Global.System
.Serializable(), _
808 Global.System
.Xml
.Serialization
.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
809 Partial
Public Class CourseGradeDataTable
810 Inherits
Global.System
.Data
.TypedTableBase(Of CourseGradeRow
)
812 Private columnEnrollmentID
As Global.System
.Data
.DataColumn
814 Private columnCourseID
As Global.System
.Data
.DataColumn
816 Private columnStudentID
As Global.System
.Data
.DataColumn
818 Private columnGrade
As Global.System
.Data
.DataColumn
820 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
823 Me.TableName
= "CourseGrade"
829 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
830 Friend Sub New(ByVal table
As Global.System
.Data
.DataTable
)
832 Me.TableName
= table
.TableName
833 If (table
.CaseSensitive
<> table
.DataSet
.CaseSensitive
) Then
834 Me.CaseSensitive
= table
.CaseSensitive
836 If (table
.Locale
.ToString
<> table
.DataSet
.Locale
.ToString
) Then
837 Me.Locale
= table
.Locale
839 If (table
.Namespace
<> table
.DataSet
.Namespace
) Then
840 Me.Namespace
= table
.Namespace
842 Me.Prefix
= table
.Prefix
843 Me.MinimumCapacity
= table
.MinimumCapacity
846 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
847 Protected
Sub New(ByVal info
As Global.System
.Runtime
.Serialization
.SerializationInfo
, ByVal context
As Global.System
.Runtime
.Serialization
.StreamingContext
)
848 MyBase
.New(info
, context
)
852 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
853 Public ReadOnly
Property EnrollmentIDColumn() As Global.System
.Data
.DataColumn
855 Return Me.columnEnrollmentID
859 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
860 Public ReadOnly
Property CourseIDColumn() As Global.System
.Data
.DataColumn
862 Return Me.columnCourseID
866 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
867 Public ReadOnly
Property StudentIDColumn() As Global.System
.Data
.DataColumn
869 Return Me.columnStudentID
873 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
874 Public ReadOnly
Property GradeColumn() As Global.System
.Data
.DataColumn
876 Return Me.columnGrade
880 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
881 Global.System
.ComponentModel
.Browsable(false)> _
882 Public ReadOnly
Property Count() As Integer
888 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
889 Public Default ReadOnly
Property Item(ByVal index
As Integer) As CourseGradeRow
891 Return CType(Me.Rows(index
),CourseGradeRow
)
895 Public Event CourseGradeRowChanging
As CourseGradeRowChangeEventHandler
897 Public Event CourseGradeRowChanged
As CourseGradeRowChangeEventHandler
899 Public Event CourseGradeRowDeleting
As CourseGradeRowChangeEventHandler
901 Public Event CourseGradeRowDeleted
As CourseGradeRowChangeEventHandler
903 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
904 Public Overloads
Sub AddCourseGradeRow(ByVal row
As CourseGradeRow
)
908 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
909 Public Overloads
Function AddCourseGradeRow(ByVal parentCourseRowByFK_CourseGrade_Course
As CourseRow
, ByVal parentPersonRowByFK_CourseGrade_Student
As PersonRow
, ByVal Grade
As Decimal) As CourseGradeRow
910 Dim rowCourseGradeRow
As CourseGradeRow
= CType(Me.NewRow
,CourseGradeRow
)
911 Dim columnValuesArray() As Object = New Object() {Nothing, Nothing, Nothing, Grade
}
912 If (Not (parentCourseRowByFK_CourseGrade_Course
) Is
Nothing) Then
913 columnValuesArray(1) = parentCourseRowByFK_CourseGrade_Course(0)
915 If (Not (parentPersonRowByFK_CourseGrade_Student
) Is
Nothing) Then
916 columnValuesArray(2) = parentPersonRowByFK_CourseGrade_Student(0)
918 rowCourseGradeRow
.ItemArray
= columnValuesArray
919 Me.Rows
.Add(rowCourseGradeRow
)
920 Return rowCourseGradeRow
923 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
924 Public Function FindByEnrollmentID(ByVal EnrollmentID
As Integer) As CourseGradeRow
925 Return CType(Me.Rows
.Find(New Object() {EnrollmentID
}),CourseGradeRow
)
928 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
929 Public Overrides
Function Clone() As Global.System
.Data
.DataTable
930 Dim cln
As CourseGradeDataTable
= CType(MyBase
.Clone
,CourseGradeDataTable
)
935 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
936 Protected Overrides
Function CreateInstance() As Global.System
.Data
.DataTable
937 Return New CourseGradeDataTable
940 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
941 Friend Sub InitVars()
942 Me.columnEnrollmentID
= MyBase
.Columns("EnrollmentID")
943 Me.columnCourseID
= MyBase
.Columns("CourseID")
944 Me.columnStudentID
= MyBase
.Columns("StudentID")
945 Me.columnGrade
= MyBase
.Columns("Grade")
948 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
949 Private Sub InitClass()
950 Me.columnEnrollmentID
= New Global.System
.Data
.DataColumn("EnrollmentID", GetType(Integer), Nothing, Global.System
.Data
.MappingType
.Element
)
951 MyBase
.Columns
.Add(Me.columnEnrollmentID
)
952 Me.columnCourseID
= New Global.System
.Data
.DataColumn("CourseID", GetType(Integer), Nothing, Global.System
.Data
.MappingType
.Element
)
953 MyBase
.Columns
.Add(Me.columnCourseID
)
954 Me.columnStudentID
= New Global.System
.Data
.DataColumn("StudentID", GetType(Integer), Nothing, Global.System
.Data
.MappingType
.Element
)
955 MyBase
.Columns
.Add(Me.columnStudentID
)
956 Me.columnGrade
= New Global.System
.Data
.DataColumn("Grade", GetType(Decimal), Nothing, Global.System
.Data
.MappingType
.Element
)
957 MyBase
.Columns
.Add(Me.columnGrade
)
958 Me.Constraints
.Add(New Global.System
.Data
.UniqueConstraint("Constraint1", New Global.System
.Data
.DataColumn() {Me.columnEnrollmentID
}, true))
959 Me.columnEnrollmentID
.AutoIncrement
= true
960 Me.columnEnrollmentID
.AutoIncrementSeed
= -1
961 Me.columnEnrollmentID
.AutoIncrementStep
= -1
962 Me.columnEnrollmentID
.AllowDBNull
= false
963 Me.columnEnrollmentID
.ReadOnly
= true
964 Me.columnEnrollmentID
.Unique
= true
965 Me.columnCourseID
.AllowDBNull
= false
966 Me.columnStudentID
.AllowDBNull
= false
969 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
970 Public Function NewCourseGradeRow() As CourseGradeRow
971 Return CType(Me.NewRow
,CourseGradeRow
)
974 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
975 Protected Overrides
Function NewRowFromBuilder(ByVal builder
As Global.System
.Data
.DataRowBuilder
) As Global.System
.Data
.DataRow
976 Return New CourseGradeRow(builder
)
979 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
980 Protected Overrides
Function GetRowType() As Global.System
.Type
981 Return GetType(CourseGradeRow
)
984 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
985 Protected Overrides
Sub OnRowChanged(ByVal e
As Global.System
.Data
.DataRowChangeEventArgs
)
986 MyBase
.OnRowChanged(e
)
987 If (Not (Me.CourseGradeRowChangedEvent
) Is
Nothing) Then
988 RaiseEvent CourseGradeRowChanged(Me, New CourseGradeRowChangeEvent(CType(e
.Row
,CourseGradeRow
), e
.Action
))
992 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
993 Protected Overrides
Sub OnRowChanging(ByVal e
As Global.System
.Data
.DataRowChangeEventArgs
)
994 MyBase
.OnRowChanging(e
)
995 If (Not (Me.CourseGradeRowChangingEvent
) Is
Nothing) Then
996 RaiseEvent CourseGradeRowChanging(Me, New CourseGradeRowChangeEvent(CType(e
.Row
,CourseGradeRow
), e
.Action
))
1000 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1001 Protected Overrides
Sub OnRowDeleted(ByVal e
As Global.System
.Data
.DataRowChangeEventArgs
)
1002 MyBase
.OnRowDeleted(e
)
1003 If (Not (Me.CourseGradeRowDeletedEvent
) Is
Nothing) Then
1004 RaiseEvent CourseGradeRowDeleted(Me, New CourseGradeRowChangeEvent(CType(e
.Row
,CourseGradeRow
), e
.Action
))
1008 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1009 Protected Overrides
Sub OnRowDeleting(ByVal e
As Global.System
.Data
.DataRowChangeEventArgs
)
1010 MyBase
.OnRowDeleting(e
)
1011 If (Not (Me.CourseGradeRowDeletingEvent
) Is
Nothing) Then
1012 RaiseEvent CourseGradeRowDeleting(Me, New CourseGradeRowChangeEvent(CType(e
.Row
,CourseGradeRow
), e
.Action
))
1016 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1017 Public Sub RemoveCourseGradeRow(ByVal row
As CourseGradeRow
)
1021 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1022 Public Shared
Function GetTypedTableSchema(ByVal xs
As Global.System
.Xml
.Schema
.XmlSchemaSet
) As Global.System
.Xml
.Schema
.XmlSchemaComplexType
1023 Dim type As Global.System
.Xml
.Schema
.XmlSchemaComplexType
= New Global.System
.Xml
.Schema
.XmlSchemaComplexType
1024 Dim sequence
As Global.System
.Xml
.Schema
.XmlSchemaSequence
= New Global.System
.Xml
.Schema
.XmlSchemaSequence
1025 Dim ds
As SQLServer2005DBDataSet
= New SQLServer2005DBDataSet
1026 Dim any1
As Global.System
.Xml
.Schema
.XmlSchemaAny
= New Global.System
.Xml
.Schema
.XmlSchemaAny
1027 any1
.Namespace
= "http://www.w3.org/2001/XMLSchema"
1028 any1
.MinOccurs
= New Decimal(0)
1029 any1
.MaxOccurs
= Decimal.MaxValue
1030 any1
.ProcessContents
= Global.System
.Xml
.Schema
.XmlSchemaContentProcessing
.Lax
1031 sequence
.Items
.Add(any1
)
1032 Dim any2
As Global.System
.Xml
.Schema
.XmlSchemaAny
= New Global.System
.Xml
.Schema
.XmlSchemaAny
1033 any2
.Namespace
= "urn:schemas-microsoft-com:xml-diffgram-v1"
1034 any2
.MinOccurs
= New Decimal(1)
1035 any2
.ProcessContents
= Global.System
.Xml
.Schema
.XmlSchemaContentProcessing
.Lax
1036 sequence
.Items
.Add(any2
)
1037 Dim attribute1
As Global.System
.Xml
.Schema
.XmlSchemaAttribute
= New Global.System
.Xml
.Schema
.XmlSchemaAttribute
1038 attribute1
.Name
= "namespace"
1039 attribute1
.FixedValue
= ds
.Namespace
1040 type.Attributes
.Add(attribute1
)
1041 Dim attribute2
As Global.System
.Xml
.Schema
.XmlSchemaAttribute
= New Global.System
.Xml
.Schema
.XmlSchemaAttribute
1042 attribute2
.Name
= "tableTypeName"
1043 attribute2
.FixedValue
= "CourseGradeDataTable"
1044 type.Attributes
.Add(attribute2
)
1045 type.Particle
= sequence
1046 Dim dsSchema
As Global.System
.Xml
.Schema
.XmlSchema
= ds
.GetSchemaSerializable
1047 If xs
.Contains(dsSchema
.TargetNamespace
) Then
1048 Dim s1
As Global.System
.IO
.MemoryStream
= New Global.System
.IO
.MemoryStream
1049 Dim s2
As Global.System
.IO
.MemoryStream
= New Global.System
.IO
.MemoryStream
1051 Dim schema
As Global.System
.Xml
.Schema
.XmlSchema
= Nothing
1053 Dim schemas
As Global.System
.Collections
.IEnumerator
= xs
.Schemas(dsSchema
.TargetNamespace
).GetEnumerator
1054 Do While schemas
.MoveNext
1055 schema
= CType(schemas
.Current
,Global.System
.Xml
.Schema
.XmlSchema
)
1058 If (s1
.Length
= s2
.Length
) Then
1062 Do While ((s1
.Position
<> s1
.Length
) _
1063 AndAlso (s1
.ReadByte
= s2
.ReadByte
))
1067 If (s1
.Position
= s1
.Length
) Then
1074 If (Not (s1
) Is
Nothing) Then
1077 If (Not (s2
) Is
Nothing) Then
1088 '''Represents the strongly named DataTable class.
1090 <Global.System
.CodeDom
.Compiler
.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
1091 Global.System
.Serializable(), _
1092 Global.System
.Xml
.Serialization
.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
1093 Partial
Public Class CourseInstructorDataTable
1094 Inherits
Global.System
.Data
.TypedTableBase(Of CourseInstructorRow
)
1096 Private columnCourseID
As Global.System
.Data
.DataColumn
1098 Private columnPersonID
As Global.System
.Data
.DataColumn
1100 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1103 Me.TableName
= "CourseInstructor"
1109 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1110 Friend Sub New(ByVal table
As Global.System
.Data
.DataTable
)
1112 Me.TableName
= table
.TableName
1113 If (table
.CaseSensitive
<> table
.DataSet
.CaseSensitive
) Then
1114 Me.CaseSensitive
= table
.CaseSensitive
1116 If (table
.Locale
.ToString
<> table
.DataSet
.Locale
.ToString
) Then
1117 Me.Locale
= table
.Locale
1119 If (table
.Namespace
<> table
.DataSet
.Namespace
) Then
1120 Me.Namespace
= table
.Namespace
1122 Me.Prefix
= table
.Prefix
1123 Me.MinimumCapacity
= table
.MinimumCapacity
1126 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1127 Protected
Sub New(ByVal info
As Global.System
.Runtime
.Serialization
.SerializationInfo
, ByVal context
As Global.System
.Runtime
.Serialization
.StreamingContext
)
1128 MyBase
.New(info
, context
)
1132 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1133 Public ReadOnly
Property CourseIDColumn() As Global.System
.Data
.DataColumn
1135 Return Me.columnCourseID
1139 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1140 Public ReadOnly
Property PersonIDColumn() As Global.System
.Data
.DataColumn
1142 Return Me.columnPersonID
1146 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
1147 Global.System
.ComponentModel
.Browsable(false)> _
1148 Public ReadOnly
Property Count() As Integer
1150 Return Me.Rows
.Count
1154 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1155 Public Default ReadOnly
Property Item(ByVal index
As Integer) As CourseInstructorRow
1157 Return CType(Me.Rows(index
),CourseInstructorRow
)
1161 Public Event CourseInstructorRowChanging
As CourseInstructorRowChangeEventHandler
1163 Public Event CourseInstructorRowChanged
As CourseInstructorRowChangeEventHandler
1165 Public Event CourseInstructorRowDeleting
As CourseInstructorRowChangeEventHandler
1167 Public Event CourseInstructorRowDeleted
As CourseInstructorRowChangeEventHandler
1169 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1170 Public Overloads
Sub AddCourseInstructorRow(ByVal row
As CourseInstructorRow
)
1174 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1175 Public Overloads
Function AddCourseInstructorRow(ByVal parentCourseRowByFK_CourseInstructor_Course
As CourseRow
, ByVal parentPersonRowByFK_CourseInstructor_Person
As PersonRow
) As CourseInstructorRow
1176 Dim rowCourseInstructorRow
As CourseInstructorRow
= CType(Me.NewRow
,CourseInstructorRow
)
1177 Dim columnValuesArray() As Object = New Object() {Nothing, Nothing}
1178 If (Not (parentCourseRowByFK_CourseInstructor_Course
) Is
Nothing) Then
1179 columnValuesArray(0) = parentCourseRowByFK_CourseInstructor_Course(0)
1181 If (Not (parentPersonRowByFK_CourseInstructor_Person
) Is
Nothing) Then
1182 columnValuesArray(1) = parentPersonRowByFK_CourseInstructor_Person(0)
1184 rowCourseInstructorRow
.ItemArray
= columnValuesArray
1185 Me.Rows
.Add(rowCourseInstructorRow
)
1186 Return rowCourseInstructorRow
1189 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1190 Public Function FindByCourseIDPersonID(ByVal CourseID
As Integer, ByVal PersonID
As Integer) As CourseInstructorRow
1191 Return CType(Me.Rows
.Find(New Object() {CourseID
, PersonID
}),CourseInstructorRow
)
1194 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1195 Public Overrides
Function Clone() As Global.System
.Data
.DataTable
1196 Dim cln
As CourseInstructorDataTable
= CType(MyBase
.Clone
,CourseInstructorDataTable
)
1201 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1202 Protected Overrides
Function CreateInstance() As Global.System
.Data
.DataTable
1203 Return New CourseInstructorDataTable
1206 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1207 Friend Sub InitVars()
1208 Me.columnCourseID
= MyBase
.Columns("CourseID")
1209 Me.columnPersonID
= MyBase
.Columns("PersonID")
1212 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1213 Private Sub InitClass()
1214 Me.columnCourseID
= New Global.System
.Data
.DataColumn("CourseID", GetType(Integer), Nothing, Global.System
.Data
.MappingType
.Element
)
1215 MyBase
.Columns
.Add(Me.columnCourseID
)
1216 Me.columnPersonID
= New Global.System
.Data
.DataColumn("PersonID", GetType(Integer), Nothing, Global.System
.Data
.MappingType
.Element
)
1217 MyBase
.Columns
.Add(Me.columnPersonID
)
1218 Me.Constraints
.Add(New Global.System
.Data
.UniqueConstraint("Constraint1", New Global.System
.Data
.DataColumn() {Me.columnCourseID
, Me.columnPersonID
}, true))
1219 Me.columnCourseID
.AllowDBNull
= false
1220 Me.columnPersonID
.AllowDBNull
= false
1223 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1224 Public Function NewCourseInstructorRow() As CourseInstructorRow
1225 Return CType(Me.NewRow
,CourseInstructorRow
)
1228 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1229 Protected Overrides
Function NewRowFromBuilder(ByVal builder
As Global.System
.Data
.DataRowBuilder
) As Global.System
.Data
.DataRow
1230 Return New CourseInstructorRow(builder
)
1233 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1234 Protected Overrides
Function GetRowType() As Global.System
.Type
1235 Return GetType(CourseInstructorRow
)
1238 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1239 Protected Overrides
Sub OnRowChanged(ByVal e
As Global.System
.Data
.DataRowChangeEventArgs
)
1240 MyBase
.OnRowChanged(e
)
1241 If (Not (Me.CourseInstructorRowChangedEvent
) Is
Nothing) Then
1242 RaiseEvent CourseInstructorRowChanged(Me, New CourseInstructorRowChangeEvent(CType(e
.Row
,CourseInstructorRow
), e
.Action
))
1246 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1247 Protected Overrides
Sub OnRowChanging(ByVal e
As Global.System
.Data
.DataRowChangeEventArgs
)
1248 MyBase
.OnRowChanging(e
)
1249 If (Not (Me.CourseInstructorRowChangingEvent
) Is
Nothing) Then
1250 RaiseEvent CourseInstructorRowChanging(Me, New CourseInstructorRowChangeEvent(CType(e
.Row
,CourseInstructorRow
), e
.Action
))
1254 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1255 Protected Overrides
Sub OnRowDeleted(ByVal e
As Global.System
.Data
.DataRowChangeEventArgs
)
1256 MyBase
.OnRowDeleted(e
)
1257 If (Not (Me.CourseInstructorRowDeletedEvent
) Is
Nothing) Then
1258 RaiseEvent CourseInstructorRowDeleted(Me, New CourseInstructorRowChangeEvent(CType(e
.Row
,CourseInstructorRow
), e
.Action
))
1262 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1263 Protected Overrides
Sub OnRowDeleting(ByVal e
As Global.System
.Data
.DataRowChangeEventArgs
)
1264 MyBase
.OnRowDeleting(e
)
1265 If (Not (Me.CourseInstructorRowDeletingEvent
) Is
Nothing) Then
1266 RaiseEvent CourseInstructorRowDeleting(Me, New CourseInstructorRowChangeEvent(CType(e
.Row
,CourseInstructorRow
), e
.Action
))
1270 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1271 Public Sub RemoveCourseInstructorRow(ByVal row
As CourseInstructorRow
)
1275 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1276 Public Shared
Function GetTypedTableSchema(ByVal xs
As Global.System
.Xml
.Schema
.XmlSchemaSet
) As Global.System
.Xml
.Schema
.XmlSchemaComplexType
1277 Dim type As Global.System
.Xml
.Schema
.XmlSchemaComplexType
= New Global.System
.Xml
.Schema
.XmlSchemaComplexType
1278 Dim sequence
As Global.System
.Xml
.Schema
.XmlSchemaSequence
= New Global.System
.Xml
.Schema
.XmlSchemaSequence
1279 Dim ds
As SQLServer2005DBDataSet
= New SQLServer2005DBDataSet
1280 Dim any1
As Global.System
.Xml
.Schema
.XmlSchemaAny
= New Global.System
.Xml
.Schema
.XmlSchemaAny
1281 any1
.Namespace
= "http://www.w3.org/2001/XMLSchema"
1282 any1
.MinOccurs
= New Decimal(0)
1283 any1
.MaxOccurs
= Decimal.MaxValue
1284 any1
.ProcessContents
= Global.System
.Xml
.Schema
.XmlSchemaContentProcessing
.Lax
1285 sequence
.Items
.Add(any1
)
1286 Dim any2
As Global.System
.Xml
.Schema
.XmlSchemaAny
= New Global.System
.Xml
.Schema
.XmlSchemaAny
1287 any2
.Namespace
= "urn:schemas-microsoft-com:xml-diffgram-v1"
1288 any2
.MinOccurs
= New Decimal(1)
1289 any2
.ProcessContents
= Global.System
.Xml
.Schema
.XmlSchemaContentProcessing
.Lax
1290 sequence
.Items
.Add(any2
)
1291 Dim attribute1
As Global.System
.Xml
.Schema
.XmlSchemaAttribute
= New Global.System
.Xml
.Schema
.XmlSchemaAttribute
1292 attribute1
.Name
= "namespace"
1293 attribute1
.FixedValue
= ds
.Namespace
1294 type.Attributes
.Add(attribute1
)
1295 Dim attribute2
As Global.System
.Xml
.Schema
.XmlSchemaAttribute
= New Global.System
.Xml
.Schema
.XmlSchemaAttribute
1296 attribute2
.Name
= "tableTypeName"
1297 attribute2
.FixedValue
= "CourseInstructorDataTable"
1298 type.Attributes
.Add(attribute2
)
1299 type.Particle
= sequence
1300 Dim dsSchema
As Global.System
.Xml
.Schema
.XmlSchema
= ds
.GetSchemaSerializable
1301 If xs
.Contains(dsSchema
.TargetNamespace
) Then
1302 Dim s1
As Global.System
.IO
.MemoryStream
= New Global.System
.IO
.MemoryStream
1303 Dim s2
As Global.System
.IO
.MemoryStream
= New Global.System
.IO
.MemoryStream
1305 Dim schema
As Global.System
.Xml
.Schema
.XmlSchema
= Nothing
1307 Dim schemas
As Global.System
.Collections
.IEnumerator
= xs
.Schemas(dsSchema
.TargetNamespace
).GetEnumerator
1308 Do While schemas
.MoveNext
1309 schema
= CType(schemas
.Current
,Global.System
.Xml
.Schema
.XmlSchema
)
1312 If (s1
.Length
= s2
.Length
) Then
1316 Do While ((s1
.Position
<> s1
.Length
) _
1317 AndAlso (s1
.ReadByte
= s2
.ReadByte
))
1321 If (s1
.Position
= s1
.Length
) Then
1328 If (Not (s1
) Is
Nothing) Then
1331 If (Not (s2
) Is
Nothing) Then
1342 '''Represents the strongly named DataTable class.
1344 <Global.System
.CodeDom
.Compiler
.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
1345 Global.System
.Serializable(), _
1346 Global.System
.Xml
.Serialization
.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
1347 Partial
Public Class DepartmentDataTable
1348 Inherits
Global.System
.Data
.TypedTableBase(Of DepartmentRow
)
1350 Private columnDepartmentID
As Global.System
.Data
.DataColumn
1352 Private columnName
As Global.System
.Data
.DataColumn
1354 Private columnBudget
As Global.System
.Data
.DataColumn
1356 Private columnStartDate
As Global.System
.Data
.DataColumn
1358 Private columnAdministrator
As Global.System
.Data
.DataColumn
1360 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1363 Me.TableName
= "Department"
1369 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1370 Friend Sub New(ByVal table
As Global.System
.Data
.DataTable
)
1372 Me.TableName
= table
.TableName
1373 If (table
.CaseSensitive
<> table
.DataSet
.CaseSensitive
) Then
1374 Me.CaseSensitive
= table
.CaseSensitive
1376 If (table
.Locale
.ToString
<> table
.DataSet
.Locale
.ToString
) Then
1377 Me.Locale
= table
.Locale
1379 If (table
.Namespace
<> table
.DataSet
.Namespace
) Then
1380 Me.Namespace
= table
.Namespace
1382 Me.Prefix
= table
.Prefix
1383 Me.MinimumCapacity
= table
.MinimumCapacity
1386 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1387 Protected
Sub New(ByVal info
As Global.System
.Runtime
.Serialization
.SerializationInfo
, ByVal context
As Global.System
.Runtime
.Serialization
.StreamingContext
)
1388 MyBase
.New(info
, context
)
1392 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1393 Public ReadOnly
Property DepartmentIDColumn() As Global.System
.Data
.DataColumn
1395 Return Me.columnDepartmentID
1399 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1400 Public ReadOnly
Property NameColumn() As Global.System
.Data
.DataColumn
1402 Return Me.columnName
1406 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1407 Public ReadOnly
Property BudgetColumn() As Global.System
.Data
.DataColumn
1409 Return Me.columnBudget
1413 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1414 Public ReadOnly
Property StartDateColumn() As Global.System
.Data
.DataColumn
1416 Return Me.columnStartDate
1420 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1421 Public ReadOnly
Property AdministratorColumn() As Global.System
.Data
.DataColumn
1423 Return Me.columnAdministrator
1427 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
1428 Global.System
.ComponentModel
.Browsable(false)> _
1429 Public ReadOnly
Property Count() As Integer
1431 Return Me.Rows
.Count
1435 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1436 Public Default ReadOnly
Property Item(ByVal index
As Integer) As DepartmentRow
1438 Return CType(Me.Rows(index
),DepartmentRow
)
1442 Public Event DepartmentRowChanging
As DepartmentRowChangeEventHandler
1444 Public Event DepartmentRowChanged
As DepartmentRowChangeEventHandler
1446 Public Event DepartmentRowDeleting
As DepartmentRowChangeEventHandler
1448 Public Event DepartmentRowDeleted
As DepartmentRowChangeEventHandler
1450 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1451 Public Overloads
Sub AddDepartmentRow(ByVal row
As DepartmentRow
)
1455 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1456 Public Overloads
Function AddDepartmentRow(ByVal DepartmentID
As Integer, ByVal Name
As String, ByVal Budget
As Decimal, ByVal StartDate
As Date, ByVal Administrator
As Integer) As DepartmentRow
1457 Dim rowDepartmentRow
As DepartmentRow
= CType(Me.NewRow
,DepartmentRow
)
1458 Dim columnValuesArray() As Object = New Object() {DepartmentID
, Name
, Budget
, StartDate
, Administrator
}
1459 rowDepartmentRow
.ItemArray
= columnValuesArray
1460 Me.Rows
.Add(rowDepartmentRow
)
1461 Return rowDepartmentRow
1464 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1465 Public Function FindByDepartmentID(ByVal DepartmentID
As Integer) As DepartmentRow
1466 Return CType(Me.Rows
.Find(New Object() {DepartmentID
}),DepartmentRow
)
1469 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1470 Public Overrides
Function Clone() As Global.System
.Data
.DataTable
1471 Dim cln
As DepartmentDataTable
= CType(MyBase
.Clone
,DepartmentDataTable
)
1476 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1477 Protected Overrides
Function CreateInstance() As Global.System
.Data
.DataTable
1478 Return New DepartmentDataTable
1481 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1482 Friend Sub InitVars()
1483 Me.columnDepartmentID
= MyBase
.Columns("DepartmentID")
1484 Me.columnName
= MyBase
.Columns("Name")
1485 Me.columnBudget
= MyBase
.Columns("Budget")
1486 Me.columnStartDate
= MyBase
.Columns("StartDate")
1487 Me.columnAdministrator
= MyBase
.Columns("Administrator")
1490 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1491 Private Sub InitClass()
1492 Me.columnDepartmentID
= New Global.System
.Data
.DataColumn("DepartmentID", GetType(Integer), Nothing, Global.System
.Data
.MappingType
.Element
)
1493 MyBase
.Columns
.Add(Me.columnDepartmentID
)
1494 Me.columnName
= New Global.System
.Data
.DataColumn("Name", GetType(String), Nothing, Global.System
.Data
.MappingType
.Element
)
1495 MyBase
.Columns
.Add(Me.columnName
)
1496 Me.columnBudget
= New Global.System
.Data
.DataColumn("Budget", GetType(Decimal), Nothing, Global.System
.Data
.MappingType
.Element
)
1497 MyBase
.Columns
.Add(Me.columnBudget
)
1498 Me.columnStartDate
= New Global.System
.Data
.DataColumn("StartDate", GetType(Date), Nothing, Global.System
.Data
.MappingType
.Element
)
1499 MyBase
.Columns
.Add(Me.columnStartDate
)
1500 Me.columnAdministrator
= New Global.System
.Data
.DataColumn("Administrator", GetType(Integer), Nothing, Global.System
.Data
.MappingType
.Element
)
1501 MyBase
.Columns
.Add(Me.columnAdministrator
)
1502 Me.Constraints
.Add(New Global.System
.Data
.UniqueConstraint("Constraint1", New Global.System
.Data
.DataColumn() {Me.columnDepartmentID
}, true))
1503 Me.columnDepartmentID
.AllowDBNull
= false
1504 Me.columnDepartmentID
.Unique
= true
1505 Me.columnName
.AllowDBNull
= false
1506 Me.columnName
.MaxLength
= 50
1507 Me.columnBudget
.AllowDBNull
= false
1508 Me.columnStartDate
.AllowDBNull
= false
1511 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1512 Public Function NewDepartmentRow() As DepartmentRow
1513 Return CType(Me.NewRow
,DepartmentRow
)
1516 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1517 Protected Overrides
Function NewRowFromBuilder(ByVal builder
As Global.System
.Data
.DataRowBuilder
) As Global.System
.Data
.DataRow
1518 Return New DepartmentRow(builder
)
1521 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1522 Protected Overrides
Function GetRowType() As Global.System
.Type
1523 Return GetType(DepartmentRow
)
1526 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1527 Protected Overrides
Sub OnRowChanged(ByVal e
As Global.System
.Data
.DataRowChangeEventArgs
)
1528 MyBase
.OnRowChanged(e
)
1529 If (Not (Me.DepartmentRowChangedEvent
) Is
Nothing) Then
1530 RaiseEvent DepartmentRowChanged(Me, New DepartmentRowChangeEvent(CType(e
.Row
,DepartmentRow
), e
.Action
))
1534 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1535 Protected Overrides
Sub OnRowChanging(ByVal e
As Global.System
.Data
.DataRowChangeEventArgs
)
1536 MyBase
.OnRowChanging(e
)
1537 If (Not (Me.DepartmentRowChangingEvent
) Is
Nothing) Then
1538 RaiseEvent DepartmentRowChanging(Me, New DepartmentRowChangeEvent(CType(e
.Row
,DepartmentRow
), e
.Action
))
1542 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1543 Protected Overrides
Sub OnRowDeleted(ByVal e
As Global.System
.Data
.DataRowChangeEventArgs
)
1544 MyBase
.OnRowDeleted(e
)
1545 If (Not (Me.DepartmentRowDeletedEvent
) Is
Nothing) Then
1546 RaiseEvent DepartmentRowDeleted(Me, New DepartmentRowChangeEvent(CType(e
.Row
,DepartmentRow
), e
.Action
))
1550 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1551 Protected Overrides
Sub OnRowDeleting(ByVal e
As Global.System
.Data
.DataRowChangeEventArgs
)
1552 MyBase
.OnRowDeleting(e
)
1553 If (Not (Me.DepartmentRowDeletingEvent
) Is
Nothing) Then
1554 RaiseEvent DepartmentRowDeleting(Me, New DepartmentRowChangeEvent(CType(e
.Row
,DepartmentRow
), e
.Action
))
1558 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1559 Public Sub RemoveDepartmentRow(ByVal row
As DepartmentRow
)
1563 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1564 Public Shared
Function GetTypedTableSchema(ByVal xs
As Global.System
.Xml
.Schema
.XmlSchemaSet
) As Global.System
.Xml
.Schema
.XmlSchemaComplexType
1565 Dim type As Global.System
.Xml
.Schema
.XmlSchemaComplexType
= New Global.System
.Xml
.Schema
.XmlSchemaComplexType
1566 Dim sequence
As Global.System
.Xml
.Schema
.XmlSchemaSequence
= New Global.System
.Xml
.Schema
.XmlSchemaSequence
1567 Dim ds
As SQLServer2005DBDataSet
= New SQLServer2005DBDataSet
1568 Dim any1
As Global.System
.Xml
.Schema
.XmlSchemaAny
= New Global.System
.Xml
.Schema
.XmlSchemaAny
1569 any1
.Namespace
= "http://www.w3.org/2001/XMLSchema"
1570 any1
.MinOccurs
= New Decimal(0)
1571 any1
.MaxOccurs
= Decimal.MaxValue
1572 any1
.ProcessContents
= Global.System
.Xml
.Schema
.XmlSchemaContentProcessing
.Lax
1573 sequence
.Items
.Add(any1
)
1574 Dim any2
As Global.System
.Xml
.Schema
.XmlSchemaAny
= New Global.System
.Xml
.Schema
.XmlSchemaAny
1575 any2
.Namespace
= "urn:schemas-microsoft-com:xml-diffgram-v1"
1576 any2
.MinOccurs
= New Decimal(1)
1577 any2
.ProcessContents
= Global.System
.Xml
.Schema
.XmlSchemaContentProcessing
.Lax
1578 sequence
.Items
.Add(any2
)
1579 Dim attribute1
As Global.System
.Xml
.Schema
.XmlSchemaAttribute
= New Global.System
.Xml
.Schema
.XmlSchemaAttribute
1580 attribute1
.Name
= "namespace"
1581 attribute1
.FixedValue
= ds
.Namespace
1582 type.Attributes
.Add(attribute1
)
1583 Dim attribute2
As Global.System
.Xml
.Schema
.XmlSchemaAttribute
= New Global.System
.Xml
.Schema
.XmlSchemaAttribute
1584 attribute2
.Name
= "tableTypeName"
1585 attribute2
.FixedValue
= "DepartmentDataTable"
1586 type.Attributes
.Add(attribute2
)
1587 type.Particle
= sequence
1588 Dim dsSchema
As Global.System
.Xml
.Schema
.XmlSchema
= ds
.GetSchemaSerializable
1589 If xs
.Contains(dsSchema
.TargetNamespace
) Then
1590 Dim s1
As Global.System
.IO
.MemoryStream
= New Global.System
.IO
.MemoryStream
1591 Dim s2
As Global.System
.IO
.MemoryStream
= New Global.System
.IO
.MemoryStream
1593 Dim schema
As Global.System
.Xml
.Schema
.XmlSchema
= Nothing
1595 Dim schemas
As Global.System
.Collections
.IEnumerator
= xs
.Schemas(dsSchema
.TargetNamespace
).GetEnumerator
1596 Do While schemas
.MoveNext
1597 schema
= CType(schemas
.Current
,Global.System
.Xml
.Schema
.XmlSchema
)
1600 If (s1
.Length
= s2
.Length
) Then
1604 Do While ((s1
.Position
<> s1
.Length
) _
1605 AndAlso (s1
.ReadByte
= s2
.ReadByte
))
1609 If (s1
.Position
= s1
.Length
) Then
1616 If (Not (s1
) Is
Nothing) Then
1619 If (Not (s2
) Is
Nothing) Then
1630 '''Represents the strongly named DataTable class.
1632 <Global.System
.CodeDom
.Compiler
.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
1633 Global.System
.Serializable(), _
1634 Global.System
.Xml
.Serialization
.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
1635 Partial
Public Class OfficeAssignmentDataTable
1636 Inherits
Global.System
.Data
.TypedTableBase(Of OfficeAssignmentRow
)
1638 Private columnInstructorID
As Global.System
.Data
.DataColumn
1640 Private columnLocation
As Global.System
.Data
.DataColumn
1642 Private columnTimestamp
As Global.System
.Data
.DataColumn
1644 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1647 Me.TableName
= "OfficeAssignment"
1653 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1654 Friend Sub New(ByVal table
As Global.System
.Data
.DataTable
)
1656 Me.TableName
= table
.TableName
1657 If (table
.CaseSensitive
<> table
.DataSet
.CaseSensitive
) Then
1658 Me.CaseSensitive
= table
.CaseSensitive
1660 If (table
.Locale
.ToString
<> table
.DataSet
.Locale
.ToString
) Then
1661 Me.Locale
= table
.Locale
1663 If (table
.Namespace
<> table
.DataSet
.Namespace
) Then
1664 Me.Namespace
= table
.Namespace
1666 Me.Prefix
= table
.Prefix
1667 Me.MinimumCapacity
= table
.MinimumCapacity
1670 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1671 Protected
Sub New(ByVal info
As Global.System
.Runtime
.Serialization
.SerializationInfo
, ByVal context
As Global.System
.Runtime
.Serialization
.StreamingContext
)
1672 MyBase
.New(info
, context
)
1676 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1677 Public ReadOnly
Property InstructorIDColumn() As Global.System
.Data
.DataColumn
1679 Return Me.columnInstructorID
1683 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1684 Public ReadOnly
Property LocationColumn() As Global.System
.Data
.DataColumn
1686 Return Me.columnLocation
1690 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1691 Public ReadOnly
Property TimestampColumn() As Global.System
.Data
.DataColumn
1693 Return Me.columnTimestamp
1697 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
1698 Global.System
.ComponentModel
.Browsable(false)> _
1699 Public ReadOnly
Property Count() As Integer
1701 Return Me.Rows
.Count
1705 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1706 Public Default ReadOnly
Property Item(ByVal index
As Integer) As OfficeAssignmentRow
1708 Return CType(Me.Rows(index
),OfficeAssignmentRow
)
1712 Public Event OfficeAssignmentRowChanging
As OfficeAssignmentRowChangeEventHandler
1714 Public Event OfficeAssignmentRowChanged
As OfficeAssignmentRowChangeEventHandler
1716 Public Event OfficeAssignmentRowDeleting
As OfficeAssignmentRowChangeEventHandler
1718 Public Event OfficeAssignmentRowDeleted
As OfficeAssignmentRowChangeEventHandler
1720 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1721 Public Overloads
Sub AddOfficeAssignmentRow(ByVal row
As OfficeAssignmentRow
)
1725 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1726 Public Overloads
Function AddOfficeAssignmentRow(ByVal parentPersonRowByFK_OfficeAssignment_Person
As PersonRow
, ByVal Location
As String, ByVal Timestamp() As Byte) As OfficeAssignmentRow
1727 Dim rowOfficeAssignmentRow
As OfficeAssignmentRow
= CType(Me.NewRow
,OfficeAssignmentRow
)
1728 Dim columnValuesArray() As Object = New Object() {Nothing, Location
, Timestamp
}
1729 If (Not (parentPersonRowByFK_OfficeAssignment_Person
) Is
Nothing) Then
1730 columnValuesArray(0) = parentPersonRowByFK_OfficeAssignment_Person(0)
1732 rowOfficeAssignmentRow
.ItemArray
= columnValuesArray
1733 Me.Rows
.Add(rowOfficeAssignmentRow
)
1734 Return rowOfficeAssignmentRow
1737 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1738 Public Function FindByInstructorID(ByVal InstructorID
As Integer) As OfficeAssignmentRow
1739 Return CType(Me.Rows
.Find(New Object() {InstructorID
}),OfficeAssignmentRow
)
1742 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1743 Public Overrides
Function Clone() As Global.System
.Data
.DataTable
1744 Dim cln
As OfficeAssignmentDataTable
= CType(MyBase
.Clone
,OfficeAssignmentDataTable
)
1749 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1750 Protected Overrides
Function CreateInstance() As Global.System
.Data
.DataTable
1751 Return New OfficeAssignmentDataTable
1754 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1755 Friend Sub InitVars()
1756 Me.columnInstructorID
= MyBase
.Columns("InstructorID")
1757 Me.columnLocation
= MyBase
.Columns("Location")
1758 Me.columnTimestamp
= MyBase
.Columns("Timestamp")
1761 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1762 Private Sub InitClass()
1763 Me.columnInstructorID
= New Global.System
.Data
.DataColumn("InstructorID", GetType(Integer), Nothing, Global.System
.Data
.MappingType
.Element
)
1764 MyBase
.Columns
.Add(Me.columnInstructorID
)
1765 Me.columnLocation
= New Global.System
.Data
.DataColumn("Location", GetType(String), Nothing, Global.System
.Data
.MappingType
.Element
)
1766 MyBase
.Columns
.Add(Me.columnLocation
)
1767 Me.columnTimestamp
= New Global.System
.Data
.DataColumn("Timestamp", GetType(Byte()), Nothing, Global.System
.Data
.MappingType
.Element
)
1768 MyBase
.Columns
.Add(Me.columnTimestamp
)
1769 Me.Constraints
.Add(New Global.System
.Data
.UniqueConstraint("Constraint1", New Global.System
.Data
.DataColumn() {Me.columnInstructorID
}, true))
1770 Me.columnInstructorID
.AllowDBNull
= false
1771 Me.columnInstructorID
.Unique
= true
1772 Me.columnLocation
.AllowDBNull
= false
1773 Me.columnLocation
.MaxLength
= 50
1774 Me.columnTimestamp
.ReadOnly
= true
1777 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1778 Public Function NewOfficeAssignmentRow() As OfficeAssignmentRow
1779 Return CType(Me.NewRow
,OfficeAssignmentRow
)
1782 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1783 Protected Overrides
Function NewRowFromBuilder(ByVal builder
As Global.System
.Data
.DataRowBuilder
) As Global.System
.Data
.DataRow
1784 Return New OfficeAssignmentRow(builder
)
1787 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1788 Protected Overrides
Function GetRowType() As Global.System
.Type
1789 Return GetType(OfficeAssignmentRow
)
1792 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1793 Protected Overrides
Sub OnRowChanged(ByVal e
As Global.System
.Data
.DataRowChangeEventArgs
)
1794 MyBase
.OnRowChanged(e
)
1795 If (Not (Me.OfficeAssignmentRowChangedEvent
) Is
Nothing) Then
1796 RaiseEvent OfficeAssignmentRowChanged(Me, New OfficeAssignmentRowChangeEvent(CType(e
.Row
,OfficeAssignmentRow
), e
.Action
))
1800 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1801 Protected Overrides
Sub OnRowChanging(ByVal e
As Global.System
.Data
.DataRowChangeEventArgs
)
1802 MyBase
.OnRowChanging(e
)
1803 If (Not (Me.OfficeAssignmentRowChangingEvent
) Is
Nothing) Then
1804 RaiseEvent OfficeAssignmentRowChanging(Me, New OfficeAssignmentRowChangeEvent(CType(e
.Row
,OfficeAssignmentRow
), e
.Action
))
1808 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1809 Protected Overrides
Sub OnRowDeleted(ByVal e
As Global.System
.Data
.DataRowChangeEventArgs
)
1810 MyBase
.OnRowDeleted(e
)
1811 If (Not (Me.OfficeAssignmentRowDeletedEvent
) Is
Nothing) Then
1812 RaiseEvent OfficeAssignmentRowDeleted(Me, New OfficeAssignmentRowChangeEvent(CType(e
.Row
,OfficeAssignmentRow
), e
.Action
))
1816 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1817 Protected Overrides
Sub OnRowDeleting(ByVal e
As Global.System
.Data
.DataRowChangeEventArgs
)
1818 MyBase
.OnRowDeleting(e
)
1819 If (Not (Me.OfficeAssignmentRowDeletingEvent
) Is
Nothing) Then
1820 RaiseEvent OfficeAssignmentRowDeleting(Me, New OfficeAssignmentRowChangeEvent(CType(e
.Row
,OfficeAssignmentRow
), e
.Action
))
1824 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1825 Public Sub RemoveOfficeAssignmentRow(ByVal row
As OfficeAssignmentRow
)
1829 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1830 Public Shared
Function GetTypedTableSchema(ByVal xs
As Global.System
.Xml
.Schema
.XmlSchemaSet
) As Global.System
.Xml
.Schema
.XmlSchemaComplexType
1831 Dim type As Global.System
.Xml
.Schema
.XmlSchemaComplexType
= New Global.System
.Xml
.Schema
.XmlSchemaComplexType
1832 Dim sequence
As Global.System
.Xml
.Schema
.XmlSchemaSequence
= New Global.System
.Xml
.Schema
.XmlSchemaSequence
1833 Dim ds
As SQLServer2005DBDataSet
= New SQLServer2005DBDataSet
1834 Dim any1
As Global.System
.Xml
.Schema
.XmlSchemaAny
= New Global.System
.Xml
.Schema
.XmlSchemaAny
1835 any1
.Namespace
= "http://www.w3.org/2001/XMLSchema"
1836 any1
.MinOccurs
= New Decimal(0)
1837 any1
.MaxOccurs
= Decimal.MaxValue
1838 any1
.ProcessContents
= Global.System
.Xml
.Schema
.XmlSchemaContentProcessing
.Lax
1839 sequence
.Items
.Add(any1
)
1840 Dim any2
As Global.System
.Xml
.Schema
.XmlSchemaAny
= New Global.System
.Xml
.Schema
.XmlSchemaAny
1841 any2
.Namespace
= "urn:schemas-microsoft-com:xml-diffgram-v1"
1842 any2
.MinOccurs
= New Decimal(1)
1843 any2
.ProcessContents
= Global.System
.Xml
.Schema
.XmlSchemaContentProcessing
.Lax
1844 sequence
.Items
.Add(any2
)
1845 Dim attribute1
As Global.System
.Xml
.Schema
.XmlSchemaAttribute
= New Global.System
.Xml
.Schema
.XmlSchemaAttribute
1846 attribute1
.Name
= "namespace"
1847 attribute1
.FixedValue
= ds
.Namespace
1848 type.Attributes
.Add(attribute1
)
1849 Dim attribute2
As Global.System
.Xml
.Schema
.XmlSchemaAttribute
= New Global.System
.Xml
.Schema
.XmlSchemaAttribute
1850 attribute2
.Name
= "tableTypeName"
1851 attribute2
.FixedValue
= "OfficeAssignmentDataTable"
1852 type.Attributes
.Add(attribute2
)
1853 type.Particle
= sequence
1854 Dim dsSchema
As Global.System
.Xml
.Schema
.XmlSchema
= ds
.GetSchemaSerializable
1855 If xs
.Contains(dsSchema
.TargetNamespace
) Then
1856 Dim s1
As Global.System
.IO
.MemoryStream
= New Global.System
.IO
.MemoryStream
1857 Dim s2
As Global.System
.IO
.MemoryStream
= New Global.System
.IO
.MemoryStream
1859 Dim schema
As Global.System
.Xml
.Schema
.XmlSchema
= Nothing
1861 Dim schemas
As Global.System
.Collections
.IEnumerator
= xs
.Schemas(dsSchema
.TargetNamespace
).GetEnumerator
1862 Do While schemas
.MoveNext
1863 schema
= CType(schemas
.Current
,Global.System
.Xml
.Schema
.XmlSchema
)
1866 If (s1
.Length
= s2
.Length
) Then
1870 Do While ((s1
.Position
<> s1
.Length
) _
1871 AndAlso (s1
.ReadByte
= s2
.ReadByte
))
1875 If (s1
.Position
= s1
.Length
) Then
1882 If (Not (s1
) Is
Nothing) Then
1885 If (Not (s2
) Is
Nothing) Then
1896 '''Represents the strongly named DataTable class.
1898 <Global.System
.CodeDom
.Compiler
.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
1899 Global.System
.Serializable(), _
1900 Global.System
.Xml
.Serialization
.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
1901 Partial
Public Class OnlineCourseDataTable
1902 Inherits
Global.System
.Data
.TypedTableBase(Of OnlineCourseRow
)
1904 Private columnCourseID
As Global.System
.Data
.DataColumn
1906 Private columnURL
As Global.System
.Data
.DataColumn
1908 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1911 Me.TableName
= "OnlineCourse"
1917 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1918 Friend Sub New(ByVal table
As Global.System
.Data
.DataTable
)
1920 Me.TableName
= table
.TableName
1921 If (table
.CaseSensitive
<> table
.DataSet
.CaseSensitive
) Then
1922 Me.CaseSensitive
= table
.CaseSensitive
1924 If (table
.Locale
.ToString
<> table
.DataSet
.Locale
.ToString
) Then
1925 Me.Locale
= table
.Locale
1927 If (table
.Namespace
<> table
.DataSet
.Namespace
) Then
1928 Me.Namespace
= table
.Namespace
1930 Me.Prefix
= table
.Prefix
1931 Me.MinimumCapacity
= table
.MinimumCapacity
1934 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1935 Protected
Sub New(ByVal info
As Global.System
.Runtime
.Serialization
.SerializationInfo
, ByVal context
As Global.System
.Runtime
.Serialization
.StreamingContext
)
1936 MyBase
.New(info
, context
)
1940 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1941 Public ReadOnly
Property CourseIDColumn() As Global.System
.Data
.DataColumn
1943 Return Me.columnCourseID
1947 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1948 Public ReadOnly
Property URLColumn() As Global.System
.Data
.DataColumn
1954 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
1955 Global.System
.ComponentModel
.Browsable(false)> _
1956 Public ReadOnly
Property Count() As Integer
1958 Return Me.Rows
.Count
1962 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1963 Public Default ReadOnly
Property Item(ByVal index
As Integer) As OnlineCourseRow
1965 Return CType(Me.Rows(index
),OnlineCourseRow
)
1969 Public Event OnlineCourseRowChanging
As OnlineCourseRowChangeEventHandler
1971 Public Event OnlineCourseRowChanged
As OnlineCourseRowChangeEventHandler
1973 Public Event OnlineCourseRowDeleting
As OnlineCourseRowChangeEventHandler
1975 Public Event OnlineCourseRowDeleted
As OnlineCourseRowChangeEventHandler
1977 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1978 Public Overloads
Sub AddOnlineCourseRow(ByVal row
As OnlineCourseRow
)
1982 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1983 Public Overloads
Function AddOnlineCourseRow(ByVal parentCourseRowByFK_OnlineCourse_Course
As CourseRow
, ByVal URL
As String) As OnlineCourseRow
1984 Dim rowOnlineCourseRow
As OnlineCourseRow
= CType(Me.NewRow
,OnlineCourseRow
)
1985 Dim columnValuesArray() As Object = New Object() {Nothing, URL
}
1986 If (Not (parentCourseRowByFK_OnlineCourse_Course
) Is
Nothing) Then
1987 columnValuesArray(0) = parentCourseRowByFK_OnlineCourse_Course(0)
1989 rowOnlineCourseRow
.ItemArray
= columnValuesArray
1990 Me.Rows
.Add(rowOnlineCourseRow
)
1991 Return rowOnlineCourseRow
1994 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
1995 Public Function FindByCourseID(ByVal CourseID
As Integer) As OnlineCourseRow
1996 Return CType(Me.Rows
.Find(New Object() {CourseID
}),OnlineCourseRow
)
1999 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2000 Public Overrides
Function Clone() As Global.System
.Data
.DataTable
2001 Dim cln
As OnlineCourseDataTable
= CType(MyBase
.Clone
,OnlineCourseDataTable
)
2006 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2007 Protected Overrides
Function CreateInstance() As Global.System
.Data
.DataTable
2008 Return New OnlineCourseDataTable
2011 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2012 Friend Sub InitVars()
2013 Me.columnCourseID
= MyBase
.Columns("CourseID")
2014 Me.columnURL
= MyBase
.Columns("URL")
2017 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2018 Private Sub InitClass()
2019 Me.columnCourseID
= New Global.System
.Data
.DataColumn("CourseID", GetType(Integer), Nothing, Global.System
.Data
.MappingType
.Element
)
2020 MyBase
.Columns
.Add(Me.columnCourseID
)
2021 Me.columnURL
= New Global.System
.Data
.DataColumn("URL", GetType(String), Nothing, Global.System
.Data
.MappingType
.Element
)
2022 MyBase
.Columns
.Add(Me.columnURL
)
2023 Me.Constraints
.Add(New Global.System
.Data
.UniqueConstraint("Constraint1", New Global.System
.Data
.DataColumn() {Me.columnCourseID
}, true))
2024 Me.columnCourseID
.AllowDBNull
= false
2025 Me.columnCourseID
.Unique
= true
2026 Me.columnURL
.AllowDBNull
= false
2027 Me.columnURL
.MaxLength
= 100
2030 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2031 Public Function NewOnlineCourseRow() As OnlineCourseRow
2032 Return CType(Me.NewRow
,OnlineCourseRow
)
2035 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2036 Protected Overrides
Function NewRowFromBuilder(ByVal builder
As Global.System
.Data
.DataRowBuilder
) As Global.System
.Data
.DataRow
2037 Return New OnlineCourseRow(builder
)
2040 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2041 Protected Overrides
Function GetRowType() As Global.System
.Type
2042 Return GetType(OnlineCourseRow
)
2045 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2046 Protected Overrides
Sub OnRowChanged(ByVal e
As Global.System
.Data
.DataRowChangeEventArgs
)
2047 MyBase
.OnRowChanged(e
)
2048 If (Not (Me.OnlineCourseRowChangedEvent
) Is
Nothing) Then
2049 RaiseEvent OnlineCourseRowChanged(Me, New OnlineCourseRowChangeEvent(CType(e
.Row
,OnlineCourseRow
), e
.Action
))
2053 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2054 Protected Overrides
Sub OnRowChanging(ByVal e
As Global.System
.Data
.DataRowChangeEventArgs
)
2055 MyBase
.OnRowChanging(e
)
2056 If (Not (Me.OnlineCourseRowChangingEvent
) Is
Nothing) Then
2057 RaiseEvent OnlineCourseRowChanging(Me, New OnlineCourseRowChangeEvent(CType(e
.Row
,OnlineCourseRow
), e
.Action
))
2061 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2062 Protected Overrides
Sub OnRowDeleted(ByVal e
As Global.System
.Data
.DataRowChangeEventArgs
)
2063 MyBase
.OnRowDeleted(e
)
2064 If (Not (Me.OnlineCourseRowDeletedEvent
) Is
Nothing) Then
2065 RaiseEvent OnlineCourseRowDeleted(Me, New OnlineCourseRowChangeEvent(CType(e
.Row
,OnlineCourseRow
), e
.Action
))
2069 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2070 Protected Overrides
Sub OnRowDeleting(ByVal e
As Global.System
.Data
.DataRowChangeEventArgs
)
2071 MyBase
.OnRowDeleting(e
)
2072 If (Not (Me.OnlineCourseRowDeletingEvent
) Is
Nothing) Then
2073 RaiseEvent OnlineCourseRowDeleting(Me, New OnlineCourseRowChangeEvent(CType(e
.Row
,OnlineCourseRow
), e
.Action
))
2077 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2078 Public Sub RemoveOnlineCourseRow(ByVal row
As OnlineCourseRow
)
2082 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2083 Public Shared
Function GetTypedTableSchema(ByVal xs
As Global.System
.Xml
.Schema
.XmlSchemaSet
) As Global.System
.Xml
.Schema
.XmlSchemaComplexType
2084 Dim type As Global.System
.Xml
.Schema
.XmlSchemaComplexType
= New Global.System
.Xml
.Schema
.XmlSchemaComplexType
2085 Dim sequence
As Global.System
.Xml
.Schema
.XmlSchemaSequence
= New Global.System
.Xml
.Schema
.XmlSchemaSequence
2086 Dim ds
As SQLServer2005DBDataSet
= New SQLServer2005DBDataSet
2087 Dim any1
As Global.System
.Xml
.Schema
.XmlSchemaAny
= New Global.System
.Xml
.Schema
.XmlSchemaAny
2088 any1
.Namespace
= "http://www.w3.org/2001/XMLSchema"
2089 any1
.MinOccurs
= New Decimal(0)
2090 any1
.MaxOccurs
= Decimal.MaxValue
2091 any1
.ProcessContents
= Global.System
.Xml
.Schema
.XmlSchemaContentProcessing
.Lax
2092 sequence
.Items
.Add(any1
)
2093 Dim any2
As Global.System
.Xml
.Schema
.XmlSchemaAny
= New Global.System
.Xml
.Schema
.XmlSchemaAny
2094 any2
.Namespace
= "urn:schemas-microsoft-com:xml-diffgram-v1"
2095 any2
.MinOccurs
= New Decimal(1)
2096 any2
.ProcessContents
= Global.System
.Xml
.Schema
.XmlSchemaContentProcessing
.Lax
2097 sequence
.Items
.Add(any2
)
2098 Dim attribute1
As Global.System
.Xml
.Schema
.XmlSchemaAttribute
= New Global.System
.Xml
.Schema
.XmlSchemaAttribute
2099 attribute1
.Name
= "namespace"
2100 attribute1
.FixedValue
= ds
.Namespace
2101 type.Attributes
.Add(attribute1
)
2102 Dim attribute2
As Global.System
.Xml
.Schema
.XmlSchemaAttribute
= New Global.System
.Xml
.Schema
.XmlSchemaAttribute
2103 attribute2
.Name
= "tableTypeName"
2104 attribute2
.FixedValue
= "OnlineCourseDataTable"
2105 type.Attributes
.Add(attribute2
)
2106 type.Particle
= sequence
2107 Dim dsSchema
As Global.System
.Xml
.Schema
.XmlSchema
= ds
.GetSchemaSerializable
2108 If xs
.Contains(dsSchema
.TargetNamespace
) Then
2109 Dim s1
As Global.System
.IO
.MemoryStream
= New Global.System
.IO
.MemoryStream
2110 Dim s2
As Global.System
.IO
.MemoryStream
= New Global.System
.IO
.MemoryStream
2112 Dim schema
As Global.System
.Xml
.Schema
.XmlSchema
= Nothing
2114 Dim schemas
As Global.System
.Collections
.IEnumerator
= xs
.Schemas(dsSchema
.TargetNamespace
).GetEnumerator
2115 Do While schemas
.MoveNext
2116 schema
= CType(schemas
.Current
,Global.System
.Xml
.Schema
.XmlSchema
)
2119 If (s1
.Length
= s2
.Length
) Then
2123 Do While ((s1
.Position
<> s1
.Length
) _
2124 AndAlso (s1
.ReadByte
= s2
.ReadByte
))
2128 If (s1
.Position
= s1
.Length
) Then
2135 If (Not (s1
) Is
Nothing) Then
2138 If (Not (s2
) Is
Nothing) Then
2149 '''Represents the strongly named DataTable class.
2151 <Global.System
.CodeDom
.Compiler
.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
2152 Global.System
.Serializable(), _
2153 Global.System
.Xml
.Serialization
.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
2154 Partial
Public Class OnsiteCourseDataTable
2155 Inherits
Global.System
.Data
.TypedTableBase(Of OnsiteCourseRow
)
2157 Private columnCourseID
As Global.System
.Data
.DataColumn
2159 Private columnLocation
As Global.System
.Data
.DataColumn
2161 Private columnDays
As Global.System
.Data
.DataColumn
2163 Private columnTime
As Global.System
.Data
.DataColumn
2165 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2168 Me.TableName
= "OnsiteCourse"
2174 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2175 Friend Sub New(ByVal table
As Global.System
.Data
.DataTable
)
2177 Me.TableName
= table
.TableName
2178 If (table
.CaseSensitive
<> table
.DataSet
.CaseSensitive
) Then
2179 Me.CaseSensitive
= table
.CaseSensitive
2181 If (table
.Locale
.ToString
<> table
.DataSet
.Locale
.ToString
) Then
2182 Me.Locale
= table
.Locale
2184 If (table
.Namespace
<> table
.DataSet
.Namespace
) Then
2185 Me.Namespace
= table
.Namespace
2187 Me.Prefix
= table
.Prefix
2188 Me.MinimumCapacity
= table
.MinimumCapacity
2191 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2192 Protected
Sub New(ByVal info
As Global.System
.Runtime
.Serialization
.SerializationInfo
, ByVal context
As Global.System
.Runtime
.Serialization
.StreamingContext
)
2193 MyBase
.New(info
, context
)
2197 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2198 Public ReadOnly
Property CourseIDColumn() As Global.System
.Data
.DataColumn
2200 Return Me.columnCourseID
2204 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2205 Public ReadOnly
Property LocationColumn() As Global.System
.Data
.DataColumn
2207 Return Me.columnLocation
2211 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2212 Public ReadOnly
Property DaysColumn() As Global.System
.Data
.DataColumn
2214 Return Me.columnDays
2218 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2219 Public ReadOnly
Property TimeColumn() As Global.System
.Data
.DataColumn
2221 Return Me.columnTime
2225 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
2226 Global.System
.ComponentModel
.Browsable(false)> _
2227 Public ReadOnly
Property Count() As Integer
2229 Return Me.Rows
.Count
2233 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2234 Public Default ReadOnly
Property Item(ByVal index
As Integer) As OnsiteCourseRow
2236 Return CType(Me.Rows(index
),OnsiteCourseRow
)
2240 Public Event OnsiteCourseRowChanging
As OnsiteCourseRowChangeEventHandler
2242 Public Event OnsiteCourseRowChanged
As OnsiteCourseRowChangeEventHandler
2244 Public Event OnsiteCourseRowDeleting
As OnsiteCourseRowChangeEventHandler
2246 Public Event OnsiteCourseRowDeleted
As OnsiteCourseRowChangeEventHandler
2248 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2249 Public Overloads
Sub AddOnsiteCourseRow(ByVal row
As OnsiteCourseRow
)
2253 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2254 Public Overloads
Function AddOnsiteCourseRow(ByVal parentCourseRowByFK_OnsiteCourse_Course
As CourseRow
, ByVal Location
As String, ByVal Days
As String, ByVal Time
As Date) As OnsiteCourseRow
2255 Dim rowOnsiteCourseRow
As OnsiteCourseRow
= CType(Me.NewRow
,OnsiteCourseRow
)
2256 Dim columnValuesArray() As Object = New Object() {Nothing, Location
, Days
, Time
}
2257 If (Not (parentCourseRowByFK_OnsiteCourse_Course
) Is
Nothing) Then
2258 columnValuesArray(0) = parentCourseRowByFK_OnsiteCourse_Course(0)
2260 rowOnsiteCourseRow
.ItemArray
= columnValuesArray
2261 Me.Rows
.Add(rowOnsiteCourseRow
)
2262 Return rowOnsiteCourseRow
2265 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2266 Public Function FindByCourseID(ByVal CourseID
As Integer) As OnsiteCourseRow
2267 Return CType(Me.Rows
.Find(New Object() {CourseID
}),OnsiteCourseRow
)
2270 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2271 Public Overrides
Function Clone() As Global.System
.Data
.DataTable
2272 Dim cln
As OnsiteCourseDataTable
= CType(MyBase
.Clone
,OnsiteCourseDataTable
)
2277 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2278 Protected Overrides
Function CreateInstance() As Global.System
.Data
.DataTable
2279 Return New OnsiteCourseDataTable
2282 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2283 Friend Sub InitVars()
2284 Me.columnCourseID
= MyBase
.Columns("CourseID")
2285 Me.columnLocation
= MyBase
.Columns("Location")
2286 Me.columnDays
= MyBase
.Columns("Days")
2287 Me.columnTime
= MyBase
.Columns("Time")
2290 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2291 Private Sub InitClass()
2292 Me.columnCourseID
= New Global.System
.Data
.DataColumn("CourseID", GetType(Integer), Nothing, Global.System
.Data
.MappingType
.Element
)
2293 MyBase
.Columns
.Add(Me.columnCourseID
)
2294 Me.columnLocation
= New Global.System
.Data
.DataColumn("Location", GetType(String), Nothing, Global.System
.Data
.MappingType
.Element
)
2295 MyBase
.Columns
.Add(Me.columnLocation
)
2296 Me.columnDays
= New Global.System
.Data
.DataColumn("Days", GetType(String), Nothing, Global.System
.Data
.MappingType
.Element
)
2297 MyBase
.Columns
.Add(Me.columnDays
)
2298 Me.columnTime
= New Global.System
.Data
.DataColumn("Time", GetType(Date), Nothing, Global.System
.Data
.MappingType
.Element
)
2299 MyBase
.Columns
.Add(Me.columnTime
)
2300 Me.Constraints
.Add(New Global.System
.Data
.UniqueConstraint("Constraint1", New Global.System
.Data
.DataColumn() {Me.columnCourseID
}, true))
2301 Me.columnCourseID
.AllowDBNull
= false
2302 Me.columnCourseID
.Unique
= true
2303 Me.columnLocation
.AllowDBNull
= false
2304 Me.columnLocation
.MaxLength
= 50
2305 Me.columnDays
.AllowDBNull
= false
2306 Me.columnDays
.MaxLength
= 50
2307 Me.columnTime
.AllowDBNull
= false
2310 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2311 Public Function NewOnsiteCourseRow() As OnsiteCourseRow
2312 Return CType(Me.NewRow
,OnsiteCourseRow
)
2315 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2316 Protected Overrides
Function NewRowFromBuilder(ByVal builder
As Global.System
.Data
.DataRowBuilder
) As Global.System
.Data
.DataRow
2317 Return New OnsiteCourseRow(builder
)
2320 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2321 Protected Overrides
Function GetRowType() As Global.System
.Type
2322 Return GetType(OnsiteCourseRow
)
2325 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2326 Protected Overrides
Sub OnRowChanged(ByVal e
As Global.System
.Data
.DataRowChangeEventArgs
)
2327 MyBase
.OnRowChanged(e
)
2328 If (Not (Me.OnsiteCourseRowChangedEvent
) Is
Nothing) Then
2329 RaiseEvent OnsiteCourseRowChanged(Me, New OnsiteCourseRowChangeEvent(CType(e
.Row
,OnsiteCourseRow
), e
.Action
))
2333 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2334 Protected Overrides
Sub OnRowChanging(ByVal e
As Global.System
.Data
.DataRowChangeEventArgs
)
2335 MyBase
.OnRowChanging(e
)
2336 If (Not (Me.OnsiteCourseRowChangingEvent
) Is
Nothing) Then
2337 RaiseEvent OnsiteCourseRowChanging(Me, New OnsiteCourseRowChangeEvent(CType(e
.Row
,OnsiteCourseRow
), e
.Action
))
2341 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2342 Protected Overrides
Sub OnRowDeleted(ByVal e
As Global.System
.Data
.DataRowChangeEventArgs
)
2343 MyBase
.OnRowDeleted(e
)
2344 If (Not (Me.OnsiteCourseRowDeletedEvent
) Is
Nothing) Then
2345 RaiseEvent OnsiteCourseRowDeleted(Me, New OnsiteCourseRowChangeEvent(CType(e
.Row
,OnsiteCourseRow
), e
.Action
))
2349 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2350 Protected Overrides
Sub OnRowDeleting(ByVal e
As Global.System
.Data
.DataRowChangeEventArgs
)
2351 MyBase
.OnRowDeleting(e
)
2352 If (Not (Me.OnsiteCourseRowDeletingEvent
) Is
Nothing) Then
2353 RaiseEvent OnsiteCourseRowDeleting(Me, New OnsiteCourseRowChangeEvent(CType(e
.Row
,OnsiteCourseRow
), e
.Action
))
2357 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2358 Public Sub RemoveOnsiteCourseRow(ByVal row
As OnsiteCourseRow
)
2362 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2363 Public Shared
Function GetTypedTableSchema(ByVal xs
As Global.System
.Xml
.Schema
.XmlSchemaSet
) As Global.System
.Xml
.Schema
.XmlSchemaComplexType
2364 Dim type As Global.System
.Xml
.Schema
.XmlSchemaComplexType
= New Global.System
.Xml
.Schema
.XmlSchemaComplexType
2365 Dim sequence
As Global.System
.Xml
.Schema
.XmlSchemaSequence
= New Global.System
.Xml
.Schema
.XmlSchemaSequence
2366 Dim ds
As SQLServer2005DBDataSet
= New SQLServer2005DBDataSet
2367 Dim any1
As Global.System
.Xml
.Schema
.XmlSchemaAny
= New Global.System
.Xml
.Schema
.XmlSchemaAny
2368 any1
.Namespace
= "http://www.w3.org/2001/XMLSchema"
2369 any1
.MinOccurs
= New Decimal(0)
2370 any1
.MaxOccurs
= Decimal.MaxValue
2371 any1
.ProcessContents
= Global.System
.Xml
.Schema
.XmlSchemaContentProcessing
.Lax
2372 sequence
.Items
.Add(any1
)
2373 Dim any2
As Global.System
.Xml
.Schema
.XmlSchemaAny
= New Global.System
.Xml
.Schema
.XmlSchemaAny
2374 any2
.Namespace
= "urn:schemas-microsoft-com:xml-diffgram-v1"
2375 any2
.MinOccurs
= New Decimal(1)
2376 any2
.ProcessContents
= Global.System
.Xml
.Schema
.XmlSchemaContentProcessing
.Lax
2377 sequence
.Items
.Add(any2
)
2378 Dim attribute1
As Global.System
.Xml
.Schema
.XmlSchemaAttribute
= New Global.System
.Xml
.Schema
.XmlSchemaAttribute
2379 attribute1
.Name
= "namespace"
2380 attribute1
.FixedValue
= ds
.Namespace
2381 type.Attributes
.Add(attribute1
)
2382 Dim attribute2
As Global.System
.Xml
.Schema
.XmlSchemaAttribute
= New Global.System
.Xml
.Schema
.XmlSchemaAttribute
2383 attribute2
.Name
= "tableTypeName"
2384 attribute2
.FixedValue
= "OnsiteCourseDataTable"
2385 type.Attributes
.Add(attribute2
)
2386 type.Particle
= sequence
2387 Dim dsSchema
As Global.System
.Xml
.Schema
.XmlSchema
= ds
.GetSchemaSerializable
2388 If xs
.Contains(dsSchema
.TargetNamespace
) Then
2389 Dim s1
As Global.System
.IO
.MemoryStream
= New Global.System
.IO
.MemoryStream
2390 Dim s2
As Global.System
.IO
.MemoryStream
= New Global.System
.IO
.MemoryStream
2392 Dim schema
As Global.System
.Xml
.Schema
.XmlSchema
= Nothing
2394 Dim schemas
As Global.System
.Collections
.IEnumerator
= xs
.Schemas(dsSchema
.TargetNamespace
).GetEnumerator
2395 Do While schemas
.MoveNext
2396 schema
= CType(schemas
.Current
,Global.System
.Xml
.Schema
.XmlSchema
)
2399 If (s1
.Length
= s2
.Length
) Then
2403 Do While ((s1
.Position
<> s1
.Length
) _
2404 AndAlso (s1
.ReadByte
= s2
.ReadByte
))
2408 If (s1
.Position
= s1
.Length
) Then
2415 If (Not (s1
) Is
Nothing) Then
2418 If (Not (s2
) Is
Nothing) Then
2429 '''Represents the strongly named DataTable class.
2431 <Global.System
.CodeDom
.Compiler
.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
2432 Global.System
.Serializable(), _
2433 Global.System
.Xml
.Serialization
.XmlSchemaProviderAttribute("GetTypedTableSchema")> _
2434 Partial
Public Class PersonDataTable
2435 Inherits
Global.System
.Data
.TypedTableBase(Of PersonRow
)
2437 Private columnPersonID
As Global.System
.Data
.DataColumn
2439 Private columnLastName
As Global.System
.Data
.DataColumn
2441 Private columnFirstName
As Global.System
.Data
.DataColumn
2443 Private columnHireDate
As Global.System
.Data
.DataColumn
2445 Private columnEnrollmentDate
As Global.System
.Data
.DataColumn
2447 Private columnPicture
As Global.System
.Data
.DataColumn
2449 Private columnPersonCategory
As Global.System
.Data
.DataColumn
2451 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2454 Me.TableName
= "Person"
2460 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2461 Friend Sub New(ByVal table
As Global.System
.Data
.DataTable
)
2463 Me.TableName
= table
.TableName
2464 If (table
.CaseSensitive
<> table
.DataSet
.CaseSensitive
) Then
2465 Me.CaseSensitive
= table
.CaseSensitive
2467 If (table
.Locale
.ToString
<> table
.DataSet
.Locale
.ToString
) Then
2468 Me.Locale
= table
.Locale
2470 If (table
.Namespace
<> table
.DataSet
.Namespace
) Then
2471 Me.Namespace
= table
.Namespace
2473 Me.Prefix
= table
.Prefix
2474 Me.MinimumCapacity
= table
.MinimumCapacity
2477 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2478 Protected
Sub New(ByVal info
As Global.System
.Runtime
.Serialization
.SerializationInfo
, ByVal context
As Global.System
.Runtime
.Serialization
.StreamingContext
)
2479 MyBase
.New(info
, context
)
2483 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2484 Public ReadOnly
Property PersonIDColumn() As Global.System
.Data
.DataColumn
2486 Return Me.columnPersonID
2490 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2491 Public ReadOnly
Property LastNameColumn() As Global.System
.Data
.DataColumn
2493 Return Me.columnLastName
2497 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2498 Public ReadOnly
Property FirstNameColumn() As Global.System
.Data
.DataColumn
2500 Return Me.columnFirstName
2504 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2505 Public ReadOnly
Property HireDateColumn() As Global.System
.Data
.DataColumn
2507 Return Me.columnHireDate
2511 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2512 Public ReadOnly
Property EnrollmentDateColumn() As Global.System
.Data
.DataColumn
2514 Return Me.columnEnrollmentDate
2518 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2519 Public ReadOnly
Property PictureColumn() As Global.System
.Data
.DataColumn
2521 Return Me.columnPicture
2525 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2526 Public ReadOnly
Property PersonCategoryColumn() As Global.System
.Data
.DataColumn
2528 Return Me.columnPersonCategory
2532 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
2533 Global.System
.ComponentModel
.Browsable(false)> _
2534 Public ReadOnly
Property Count() As Integer
2536 Return Me.Rows
.Count
2540 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2541 Public Default ReadOnly
Property Item(ByVal index
As Integer) As PersonRow
2543 Return CType(Me.Rows(index
),PersonRow
)
2547 Public Event PersonRowChanging
As PersonRowChangeEventHandler
2549 Public Event PersonRowChanged
As PersonRowChangeEventHandler
2551 Public Event PersonRowDeleting
As PersonRowChangeEventHandler
2553 Public Event PersonRowDeleted
As PersonRowChangeEventHandler
2555 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2556 Public Overloads
Sub AddPersonRow(ByVal row
As PersonRow
)
2560 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2561 Public Overloads
Function AddPersonRow(ByVal LastName
As String, ByVal FirstName
As String, ByVal HireDate
As Date, ByVal EnrollmentDate
As Date, ByVal Picture() As Byte, ByVal PersonCategory
As Short
) As PersonRow
2562 Dim rowPersonRow
As PersonRow
= CType(Me.NewRow
,PersonRow
)
2563 Dim columnValuesArray() As Object = New Object() {Nothing, LastName
, FirstName
, HireDate
, EnrollmentDate
, Picture
, PersonCategory
}
2564 rowPersonRow
.ItemArray
= columnValuesArray
2565 Me.Rows
.Add(rowPersonRow
)
2569 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2570 Public Function FindByPersonID(ByVal PersonID
As Integer) As PersonRow
2571 Return CType(Me.Rows
.Find(New Object() {PersonID
}),PersonRow
)
2574 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2575 Public Overrides
Function Clone() As Global.System
.Data
.DataTable
2576 Dim cln
As PersonDataTable
= CType(MyBase
.Clone
,PersonDataTable
)
2581 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2582 Protected Overrides
Function CreateInstance() As Global.System
.Data
.DataTable
2583 Return New PersonDataTable
2586 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2587 Friend Sub InitVars()
2588 Me.columnPersonID
= MyBase
.Columns("PersonID")
2589 Me.columnLastName
= MyBase
.Columns("LastName")
2590 Me.columnFirstName
= MyBase
.Columns("FirstName")
2591 Me.columnHireDate
= MyBase
.Columns("HireDate")
2592 Me.columnEnrollmentDate
= MyBase
.Columns("EnrollmentDate")
2593 Me.columnPicture
= MyBase
.Columns("Picture")
2594 Me.columnPersonCategory
= MyBase
.Columns("PersonCategory")
2597 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2598 Private Sub InitClass()
2599 Me.columnPersonID
= New Global.System
.Data
.DataColumn("PersonID", GetType(Integer), Nothing, Global.System
.Data
.MappingType
.Element
)
2600 MyBase
.Columns
.Add(Me.columnPersonID
)
2601 Me.columnLastName
= New Global.System
.Data
.DataColumn("LastName", GetType(String), Nothing, Global.System
.Data
.MappingType
.Element
)
2602 MyBase
.Columns
.Add(Me.columnLastName
)
2603 Me.columnFirstName
= New Global.System
.Data
.DataColumn("FirstName", GetType(String), Nothing, Global.System
.Data
.MappingType
.Element
)
2604 MyBase
.Columns
.Add(Me.columnFirstName
)
2605 Me.columnHireDate
= New Global.System
.Data
.DataColumn("HireDate", GetType(Date), Nothing, Global.System
.Data
.MappingType
.Element
)
2606 MyBase
.Columns
.Add(Me.columnHireDate
)
2607 Me.columnEnrollmentDate
= New Global.System
.Data
.DataColumn("EnrollmentDate", GetType(Date), Nothing, Global.System
.Data
.MappingType
.Element
)
2608 MyBase
.Columns
.Add(Me.columnEnrollmentDate
)
2609 Me.columnPicture
= New Global.System
.Data
.DataColumn("Picture", GetType(Byte()), Nothing, Global.System
.Data
.MappingType
.Element
)
2610 MyBase
.Columns
.Add(Me.columnPicture
)
2611 Me.columnPersonCategory
= New Global.System
.Data
.DataColumn("PersonCategory", GetType(Short
), Nothing, Global.System
.Data
.MappingType
.Element
)
2612 MyBase
.Columns
.Add(Me.columnPersonCategory
)
2613 Me.Constraints
.Add(New Global.System
.Data
.UniqueConstraint("Constraint1", New Global.System
.Data
.DataColumn() {Me.columnPersonID
}, true))
2614 Me.columnPersonID
.AutoIncrement
= true
2615 Me.columnPersonID
.AutoIncrementSeed
= -1
2616 Me.columnPersonID
.AutoIncrementStep
= -1
2617 Me.columnPersonID
.AllowDBNull
= false
2618 Me.columnPersonID
.ReadOnly
= true
2619 Me.columnPersonID
.Unique
= true
2620 Me.columnLastName
.AllowDBNull
= false
2621 Me.columnLastName
.MaxLength
= 50
2622 Me.columnFirstName
.AllowDBNull
= false
2623 Me.columnFirstName
.MaxLength
= 50
2624 Me.columnPersonCategory
.AllowDBNull
= false
2625 Me.columnPersonCategory
.DefaultValue
= CType(1,Short
)
2628 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2629 Public Function NewPersonRow() As PersonRow
2630 Return CType(Me.NewRow
,PersonRow
)
2633 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2634 Protected Overrides
Function NewRowFromBuilder(ByVal builder
As Global.System
.Data
.DataRowBuilder
) As Global.System
.Data
.DataRow
2635 Return New PersonRow(builder
)
2638 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2639 Protected Overrides
Function GetRowType() As Global.System
.Type
2640 Return GetType(PersonRow
)
2643 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2644 Protected Overrides
Sub OnRowChanged(ByVal e
As Global.System
.Data
.DataRowChangeEventArgs
)
2645 MyBase
.OnRowChanged(e
)
2646 If (Not (Me.PersonRowChangedEvent
) Is
Nothing) Then
2647 RaiseEvent PersonRowChanged(Me, New PersonRowChangeEvent(CType(e
.Row
,PersonRow
), e
.Action
))
2651 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2652 Protected Overrides
Sub OnRowChanging(ByVal e
As Global.System
.Data
.DataRowChangeEventArgs
)
2653 MyBase
.OnRowChanging(e
)
2654 If (Not (Me.PersonRowChangingEvent
) Is
Nothing) Then
2655 RaiseEvent PersonRowChanging(Me, New PersonRowChangeEvent(CType(e
.Row
,PersonRow
), e
.Action
))
2659 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2660 Protected Overrides
Sub OnRowDeleted(ByVal e
As Global.System
.Data
.DataRowChangeEventArgs
)
2661 MyBase
.OnRowDeleted(e
)
2662 If (Not (Me.PersonRowDeletedEvent
) Is
Nothing) Then
2663 RaiseEvent PersonRowDeleted(Me, New PersonRowChangeEvent(CType(e
.Row
,PersonRow
), e
.Action
))
2667 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2668 Protected Overrides
Sub OnRowDeleting(ByVal e
As Global.System
.Data
.DataRowChangeEventArgs
)
2669 MyBase
.OnRowDeleting(e
)
2670 If (Not (Me.PersonRowDeletingEvent
) Is
Nothing) Then
2671 RaiseEvent PersonRowDeleting(Me, New PersonRowChangeEvent(CType(e
.Row
,PersonRow
), e
.Action
))
2675 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2676 Public Sub RemovePersonRow(ByVal row
As PersonRow
)
2680 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2681 Public Shared
Function GetTypedTableSchema(ByVal xs
As Global.System
.Xml
.Schema
.XmlSchemaSet
) As Global.System
.Xml
.Schema
.XmlSchemaComplexType
2682 Dim type As Global.System
.Xml
.Schema
.XmlSchemaComplexType
= New Global.System
.Xml
.Schema
.XmlSchemaComplexType
2683 Dim sequence
As Global.System
.Xml
.Schema
.XmlSchemaSequence
= New Global.System
.Xml
.Schema
.XmlSchemaSequence
2684 Dim ds
As SQLServer2005DBDataSet
= New SQLServer2005DBDataSet
2685 Dim any1
As Global.System
.Xml
.Schema
.XmlSchemaAny
= New Global.System
.Xml
.Schema
.XmlSchemaAny
2686 any1
.Namespace
= "http://www.w3.org/2001/XMLSchema"
2687 any1
.MinOccurs
= New Decimal(0)
2688 any1
.MaxOccurs
= Decimal.MaxValue
2689 any1
.ProcessContents
= Global.System
.Xml
.Schema
.XmlSchemaContentProcessing
.Lax
2690 sequence
.Items
.Add(any1
)
2691 Dim any2
As Global.System
.Xml
.Schema
.XmlSchemaAny
= New Global.System
.Xml
.Schema
.XmlSchemaAny
2692 any2
.Namespace
= "urn:schemas-microsoft-com:xml-diffgram-v1"
2693 any2
.MinOccurs
= New Decimal(1)
2694 any2
.ProcessContents
= Global.System
.Xml
.Schema
.XmlSchemaContentProcessing
.Lax
2695 sequence
.Items
.Add(any2
)
2696 Dim attribute1
As Global.System
.Xml
.Schema
.XmlSchemaAttribute
= New Global.System
.Xml
.Schema
.XmlSchemaAttribute
2697 attribute1
.Name
= "namespace"
2698 attribute1
.FixedValue
= ds
.Namespace
2699 type.Attributes
.Add(attribute1
)
2700 Dim attribute2
As Global.System
.Xml
.Schema
.XmlSchemaAttribute
= New Global.System
.Xml
.Schema
.XmlSchemaAttribute
2701 attribute2
.Name
= "tableTypeName"
2702 attribute2
.FixedValue
= "PersonDataTable"
2703 type.Attributes
.Add(attribute2
)
2704 type.Particle
= sequence
2705 Dim dsSchema
As Global.System
.Xml
.Schema
.XmlSchema
= ds
.GetSchemaSerializable
2706 If xs
.Contains(dsSchema
.TargetNamespace
) Then
2707 Dim s1
As Global.System
.IO
.MemoryStream
= New Global.System
.IO
.MemoryStream
2708 Dim s2
As Global.System
.IO
.MemoryStream
= New Global.System
.IO
.MemoryStream
2710 Dim schema
As Global.System
.Xml
.Schema
.XmlSchema
= Nothing
2712 Dim schemas
As Global.System
.Collections
.IEnumerator
= xs
.Schemas(dsSchema
.TargetNamespace
).GetEnumerator
2713 Do While schemas
.MoveNext
2714 schema
= CType(schemas
.Current
,Global.System
.Xml
.Schema
.XmlSchema
)
2717 If (s1
.Length
= s2
.Length
) Then
2721 Do While ((s1
.Position
<> s1
.Length
) _
2722 AndAlso (s1
.ReadByte
= s2
.ReadByte
))
2726 If (s1
.Position
= s1
.Length
) Then
2733 If (Not (s1
) Is
Nothing) Then
2736 If (Not (s2
) Is
Nothing) Then
2747 '''Represents strongly named DataRow class.
2749 <Global.System
.CodeDom
.Compiler
.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
2750 Partial
Public Class CourseRow
2751 Inherits
Global.System
.Data
.DataRow
2753 Private tableCourse
As CourseDataTable
2755 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2756 Friend Sub New(ByVal rb
As Global.System
.Data
.DataRowBuilder
)
2758 Me.tableCourse
= CType(Me.Table
,CourseDataTable
)
2761 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2762 Public Property CourseID() As Integer
2764 Return CType(Me(Me.tableCourse
.CourseIDColumn
),Integer)
2767 Me(Me.tableCourse
.CourseIDColumn
) = value
2771 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2772 Public Property Title() As String
2774 Return CType(Me(Me.tableCourse
.TitleColumn
),String)
2777 Me(Me.tableCourse
.TitleColumn
) = value
2781 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2782 Public Property Credits() As Integer
2784 Return CType(Me(Me.tableCourse
.CreditsColumn
),Integer)
2787 Me(Me.tableCourse
.CreditsColumn
) = value
2791 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2792 Public Property DepartmentID() As Integer
2794 Return CType(Me(Me.tableCourse
.DepartmentIDColumn
),Integer)
2797 Me(Me.tableCourse
.DepartmentIDColumn
) = value
2801 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2802 Public Property DepartmentRow() As DepartmentRow
2804 Return CType(Me.GetParentRow(Me.Table
.ParentRelations("FK_Course_Department")),DepartmentRow
)
2807 Me.SetParentRow(value
, Me.Table
.ParentRelations("FK_Course_Department"))
2811 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2812 Public Function GetCourseGradeRows() As CourseGradeRow()
2813 If (Me.Table
.ChildRelations("FK_CourseGrade_Course") Is
Nothing) Then
2814 Return New CourseGradeRow(-1) {}
2816 Return CType(MyBase
.GetChildRows(Me.Table
.ChildRelations("FK_CourseGrade_Course")),CourseGradeRow())
2820 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2821 Public Function GetCourseInstructorRows() As CourseInstructorRow()
2822 If (Me.Table
.ChildRelations("FK_CourseInstructor_Course") Is
Nothing) Then
2823 Return New CourseInstructorRow(-1) {}
2825 Return CType(MyBase
.GetChildRows(Me.Table
.ChildRelations("FK_CourseInstructor_Course")),CourseInstructorRow())
2829 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2830 Public Function GetOnlineCourseRows() As OnlineCourseRow()
2831 If (Me.Table
.ChildRelations("FK_OnlineCourse_Course") Is
Nothing) Then
2832 Return New OnlineCourseRow(-1) {}
2834 Return CType(MyBase
.GetChildRows(Me.Table
.ChildRelations("FK_OnlineCourse_Course")),OnlineCourseRow())
2838 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2839 Public Function GetOnsiteCourseRows() As OnsiteCourseRow()
2840 If (Me.Table
.ChildRelations("FK_OnsiteCourse_Course") Is
Nothing) Then
2841 Return New OnsiteCourseRow(-1) {}
2843 Return CType(MyBase
.GetChildRows(Me.Table
.ChildRelations("FK_OnsiteCourse_Course")),OnsiteCourseRow())
2849 '''Represents strongly named DataRow class.
2851 <Global.System
.CodeDom
.Compiler
.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
2852 Partial
Public Class CourseGradeRow
2853 Inherits
Global.System
.Data
.DataRow
2855 Private tableCourseGrade
As CourseGradeDataTable
2857 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2858 Friend Sub New(ByVal rb
As Global.System
.Data
.DataRowBuilder
)
2860 Me.tableCourseGrade
= CType(Me.Table
,CourseGradeDataTable
)
2863 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2864 Public Property EnrollmentID() As Integer
2866 Return CType(Me(Me.tableCourseGrade
.EnrollmentIDColumn
),Integer)
2869 Me(Me.tableCourseGrade
.EnrollmentIDColumn
) = value
2873 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2874 Public Property CourseID() As Integer
2876 Return CType(Me(Me.tableCourseGrade
.CourseIDColumn
),Integer)
2879 Me(Me.tableCourseGrade
.CourseIDColumn
) = value
2883 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2884 Public Property StudentID() As Integer
2886 Return CType(Me(Me.tableCourseGrade
.StudentIDColumn
),Integer)
2889 Me(Me.tableCourseGrade
.StudentIDColumn
) = value
2893 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2894 Public Property Grade() As Decimal
2897 Return CType(Me(Me.tableCourseGrade
.GradeColumn
),Decimal)
2898 Catch e
As Global.System
.InvalidCastException
2899 Throw
New Global.System
.Data
.StrongTypingException("The value for column 'Grade' in table 'CourseGrade' is DBNull.", e
)
2903 Me(Me.tableCourseGrade
.GradeColumn
) = value
2907 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2908 Public Property CourseRow() As CourseRow
2910 Return CType(Me.GetParentRow(Me.Table
.ParentRelations("FK_CourseGrade_Course")),CourseRow
)
2913 Me.SetParentRow(value
, Me.Table
.ParentRelations("FK_CourseGrade_Course"))
2917 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2918 Public Property PersonRow() As PersonRow
2920 Return CType(Me.GetParentRow(Me.Table
.ParentRelations("FK_CourseGrade_Student")),PersonRow
)
2923 Me.SetParentRow(value
, Me.Table
.ParentRelations("FK_CourseGrade_Student"))
2927 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2928 Public Function IsGradeNull() As Boolean
2929 Return Me.IsNull(Me.tableCourseGrade
.GradeColumn
)
2932 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2933 Public Sub SetGradeNull()
2934 Me(Me.tableCourseGrade
.GradeColumn
) = Global.System
.Convert
.DBNull
2939 '''Represents strongly named DataRow class.
2941 <Global.System
.CodeDom
.Compiler
.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
2942 Partial
Public Class CourseInstructorRow
2943 Inherits
Global.System
.Data
.DataRow
2945 Private tableCourseInstructor
As CourseInstructorDataTable
2947 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2948 Friend Sub New(ByVal rb
As Global.System
.Data
.DataRowBuilder
)
2950 Me.tableCourseInstructor
= CType(Me.Table
,CourseInstructorDataTable
)
2953 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2954 Public Property CourseID() As Integer
2956 Return CType(Me(Me.tableCourseInstructor
.CourseIDColumn
),Integer)
2959 Me(Me.tableCourseInstructor
.CourseIDColumn
) = value
2963 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2964 Public Property PersonID() As Integer
2966 Return CType(Me(Me.tableCourseInstructor
.PersonIDColumn
),Integer)
2969 Me(Me.tableCourseInstructor
.PersonIDColumn
) = value
2973 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2974 Public Property CourseRow() As CourseRow
2976 Return CType(Me.GetParentRow(Me.Table
.ParentRelations("FK_CourseInstructor_Course")),CourseRow
)
2979 Me.SetParentRow(value
, Me.Table
.ParentRelations("FK_CourseInstructor_Course"))
2983 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
2984 Public Property PersonRow() As PersonRow
2986 Return CType(Me.GetParentRow(Me.Table
.ParentRelations("FK_CourseInstructor_Person")),PersonRow
)
2989 Me.SetParentRow(value
, Me.Table
.ParentRelations("FK_CourseInstructor_Person"))
2995 '''Represents strongly named DataRow class.
2997 <Global.System
.CodeDom
.Compiler
.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
2998 Partial
Public Class DepartmentRow
2999 Inherits
Global.System
.Data
.DataRow
3001 Private tableDepartment
As DepartmentDataTable
3003 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3004 Friend Sub New(ByVal rb
As Global.System
.Data
.DataRowBuilder
)
3006 Me.tableDepartment
= CType(Me.Table
,DepartmentDataTable
)
3009 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3010 Public Property DepartmentID() As Integer
3012 Return CType(Me(Me.tableDepartment
.DepartmentIDColumn
),Integer)
3015 Me(Me.tableDepartment
.DepartmentIDColumn
) = value
3019 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3020 Public Property Name() As String
3022 Return CType(Me(Me.tableDepartment
.NameColumn
),String)
3025 Me(Me.tableDepartment
.NameColumn
) = value
3029 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3030 Public Property Budget() As Decimal
3032 Return CType(Me(Me.tableDepartment
.BudgetColumn
),Decimal)
3035 Me(Me.tableDepartment
.BudgetColumn
) = value
3039 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3040 Public Property StartDate() As Date
3042 Return CType(Me(Me.tableDepartment
.StartDateColumn
),Date)
3045 Me(Me.tableDepartment
.StartDateColumn
) = value
3049 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3050 Public Property Administrator() As Integer
3053 Return CType(Me(Me.tableDepartment
.AdministratorColumn
),Integer)
3054 Catch e
As Global.System
.InvalidCastException
3055 Throw
New Global.System
.Data
.StrongTypingException("The value for column 'Administrator' in table 'Department' is DBNull.", e
)
3059 Me(Me.tableDepartment
.AdministratorColumn
) = value
3063 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3064 Public Function IsAdministratorNull() As Boolean
3065 Return Me.IsNull(Me.tableDepartment
.AdministratorColumn
)
3068 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3069 Public Sub SetAdministratorNull()
3070 Me(Me.tableDepartment
.AdministratorColumn
) = Global.System
.Convert
.DBNull
3073 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3074 Public Function GetCourseRows() As CourseRow()
3075 If (Me.Table
.ChildRelations("FK_Course_Department") Is
Nothing) Then
3076 Return New CourseRow(-1) {}
3078 Return CType(MyBase
.GetChildRows(Me.Table
.ChildRelations("FK_Course_Department")),CourseRow())
3084 '''Represents strongly named DataRow class.
3086 <Global.System
.CodeDom
.Compiler
.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
3087 Partial
Public Class OfficeAssignmentRow
3088 Inherits
Global.System
.Data
.DataRow
3090 Private tableOfficeAssignment
As OfficeAssignmentDataTable
3092 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3093 Friend Sub New(ByVal rb
As Global.System
.Data
.DataRowBuilder
)
3095 Me.tableOfficeAssignment
= CType(Me.Table
,OfficeAssignmentDataTable
)
3098 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3099 Public Property InstructorID() As Integer
3101 Return CType(Me(Me.tableOfficeAssignment
.InstructorIDColumn
),Integer)
3104 Me(Me.tableOfficeAssignment
.InstructorIDColumn
) = value
3108 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3109 Public Property Location() As String
3111 Return CType(Me(Me.tableOfficeAssignment
.LocationColumn
),String)
3114 Me(Me.tableOfficeAssignment
.LocationColumn
) = value
3118 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3119 Public Property Timestamp() As Byte()
3122 Return CType(Me(Me.tableOfficeAssignment
.TimestampColumn
),Byte())
3123 Catch e
As Global.System
.InvalidCastException
3124 Throw
New Global.System
.Data
.StrongTypingException("The value for column 'Timestamp' in table 'OfficeAssignment' is DBNull.", e
)
3128 Me(Me.tableOfficeAssignment
.TimestampColumn
) = value
3132 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3133 Public Property PersonRow() As PersonRow
3135 Return CType(Me.GetParentRow(Me.Table
.ParentRelations("FK_OfficeAssignment_Person")),PersonRow
)
3138 Me.SetParentRow(value
, Me.Table
.ParentRelations("FK_OfficeAssignment_Person"))
3142 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3143 Public Function IsTimestampNull() As Boolean
3144 Return Me.IsNull(Me.tableOfficeAssignment
.TimestampColumn
)
3147 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3148 Public Sub SetTimestampNull()
3149 Me(Me.tableOfficeAssignment
.TimestampColumn
) = Global.System
.Convert
.DBNull
3154 '''Represents strongly named DataRow class.
3156 <Global.System
.CodeDom
.Compiler
.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
3157 Partial
Public Class OnlineCourseRow
3158 Inherits
Global.System
.Data
.DataRow
3160 Private tableOnlineCourse
As OnlineCourseDataTable
3162 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3163 Friend Sub New(ByVal rb
As Global.System
.Data
.DataRowBuilder
)
3165 Me.tableOnlineCourse
= CType(Me.Table
,OnlineCourseDataTable
)
3168 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3169 Public Property CourseID() As Integer
3171 Return CType(Me(Me.tableOnlineCourse
.CourseIDColumn
),Integer)
3174 Me(Me.tableOnlineCourse
.CourseIDColumn
) = value
3178 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3179 Public Property URL() As String
3181 Return CType(Me(Me.tableOnlineCourse
.URLColumn
),String)
3184 Me(Me.tableOnlineCourse
.URLColumn
) = value
3188 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3189 Public Property CourseRow() As CourseRow
3191 Return CType(Me.GetParentRow(Me.Table
.ParentRelations("FK_OnlineCourse_Course")),CourseRow
)
3194 Me.SetParentRow(value
, Me.Table
.ParentRelations("FK_OnlineCourse_Course"))
3200 '''Represents strongly named DataRow class.
3202 <Global.System
.CodeDom
.Compiler
.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
3203 Partial
Public Class OnsiteCourseRow
3204 Inherits
Global.System
.Data
.DataRow
3206 Private tableOnsiteCourse
As OnsiteCourseDataTable
3208 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3209 Friend Sub New(ByVal rb
As Global.System
.Data
.DataRowBuilder
)
3211 Me.tableOnsiteCourse
= CType(Me.Table
,OnsiteCourseDataTable
)
3214 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3215 Public Property CourseID() As Integer
3217 Return CType(Me(Me.tableOnsiteCourse
.CourseIDColumn
),Integer)
3220 Me(Me.tableOnsiteCourse
.CourseIDColumn
) = value
3224 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3225 Public Property Location() As String
3227 Return CType(Me(Me.tableOnsiteCourse
.LocationColumn
),String)
3230 Me(Me.tableOnsiteCourse
.LocationColumn
) = value
3234 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3235 Public Property Days() As String
3237 Return CType(Me(Me.tableOnsiteCourse
.DaysColumn
),String)
3240 Me(Me.tableOnsiteCourse
.DaysColumn
) = value
3244 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3245 Public Property Time() As Date
3247 Return CType(Me(Me.tableOnsiteCourse
.TimeColumn
),Date)
3250 Me(Me.tableOnsiteCourse
.TimeColumn
) = value
3254 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3255 Public Property CourseRow() As CourseRow
3257 Return CType(Me.GetParentRow(Me.Table
.ParentRelations("FK_OnsiteCourse_Course")),CourseRow
)
3260 Me.SetParentRow(value
, Me.Table
.ParentRelations("FK_OnsiteCourse_Course"))
3266 '''Represents strongly named DataRow class.
3268 <Global.System
.CodeDom
.Compiler
.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
3269 Partial
Public Class PersonRow
3270 Inherits
Global.System
.Data
.DataRow
3272 Private tablePerson
As PersonDataTable
3274 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3275 Friend Sub New(ByVal rb
As Global.System
.Data
.DataRowBuilder
)
3277 Me.tablePerson
= CType(Me.Table
,PersonDataTable
)
3280 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3281 Public Property PersonID() As Integer
3283 Return CType(Me(Me.tablePerson
.PersonIDColumn
),Integer)
3286 Me(Me.tablePerson
.PersonIDColumn
) = value
3290 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3291 Public Property LastName() As String
3293 Return CType(Me(Me.tablePerson
.LastNameColumn
),String)
3296 Me(Me.tablePerson
.LastNameColumn
) = value
3300 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3301 Public Property FirstName() As String
3303 Return CType(Me(Me.tablePerson
.FirstNameColumn
),String)
3306 Me(Me.tablePerson
.FirstNameColumn
) = value
3310 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3311 Public Property HireDate() As Date
3314 Return CType(Me(Me.tablePerson
.HireDateColumn
),Date)
3315 Catch e
As Global.System
.InvalidCastException
3316 Throw
New Global.System
.Data
.StrongTypingException("The value for column 'HireDate' in table 'Person' is DBNull.", e
)
3320 Me(Me.tablePerson
.HireDateColumn
) = value
3324 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3325 Public Property EnrollmentDate() As Date
3328 Return CType(Me(Me.tablePerson
.EnrollmentDateColumn
),Date)
3329 Catch e
As Global.System
.InvalidCastException
3330 Throw
New Global.System
.Data
.StrongTypingException("The value for column 'EnrollmentDate' in table 'Person' is DBNull.", e
)
3334 Me(Me.tablePerson
.EnrollmentDateColumn
) = value
3338 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3339 Public Property Picture() As Byte()
3342 Return CType(Me(Me.tablePerson
.PictureColumn
),Byte())
3343 Catch e
As Global.System
.InvalidCastException
3344 Throw
New Global.System
.Data
.StrongTypingException("The value for column 'Picture' in table 'Person' is DBNull.", e
)
3348 Me(Me.tablePerson
.PictureColumn
) = value
3352 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3353 Public Property PersonCategory() As Short
3355 Return CType(Me(Me.tablePerson
.PersonCategoryColumn
),Short
)
3358 Me(Me.tablePerson
.PersonCategoryColumn
) = value
3362 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3363 Public Function IsHireDateNull() As Boolean
3364 Return Me.IsNull(Me.tablePerson
.HireDateColumn
)
3367 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3368 Public Sub SetHireDateNull()
3369 Me(Me.tablePerson
.HireDateColumn
) = Global.System
.Convert
.DBNull
3372 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3373 Public Function IsEnrollmentDateNull() As Boolean
3374 Return Me.IsNull(Me.tablePerson
.EnrollmentDateColumn
)
3377 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3378 Public Sub SetEnrollmentDateNull()
3379 Me(Me.tablePerson
.EnrollmentDateColumn
) = Global.System
.Convert
.DBNull
3382 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3383 Public Function IsPictureNull() As Boolean
3384 Return Me.IsNull(Me.tablePerson
.PictureColumn
)
3387 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3388 Public Sub SetPictureNull()
3389 Me(Me.tablePerson
.PictureColumn
) = Global.System
.Convert
.DBNull
3392 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3393 Public Function GetCourseGradeRows() As CourseGradeRow()
3394 If (Me.Table
.ChildRelations("FK_CourseGrade_Student") Is
Nothing) Then
3395 Return New CourseGradeRow(-1) {}
3397 Return CType(MyBase
.GetChildRows(Me.Table
.ChildRelations("FK_CourseGrade_Student")),CourseGradeRow())
3401 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3402 Public Function GetCourseInstructorRows() As CourseInstructorRow()
3403 If (Me.Table
.ChildRelations("FK_CourseInstructor_Person") Is
Nothing) Then
3404 Return New CourseInstructorRow(-1) {}
3406 Return CType(MyBase
.GetChildRows(Me.Table
.ChildRelations("FK_CourseInstructor_Person")),CourseInstructorRow())
3410 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3411 Public Function GetOfficeAssignmentRows() As OfficeAssignmentRow()
3412 If (Me.Table
.ChildRelations("FK_OfficeAssignment_Person") Is
Nothing) Then
3413 Return New OfficeAssignmentRow(-1) {}
3415 Return CType(MyBase
.GetChildRows(Me.Table
.ChildRelations("FK_OfficeAssignment_Person")),OfficeAssignmentRow())
3421 '''Row event argument class
3423 <Global.System
.CodeDom
.Compiler
.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
3424 Public Class CourseRowChangeEvent
3425 Inherits
Global.System
.EventArgs
3427 Private eventRow
As CourseRow
3429 Private eventAction
As Global.System
.Data
.DataRowAction
3431 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3432 Public Sub New(ByVal row
As CourseRow
, ByVal action
As Global.System
.Data
.DataRowAction
)
3435 Me.eventAction
= action
3438 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3439 Public ReadOnly
Property Row() As CourseRow
3445 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3446 Public ReadOnly
Property Action() As Global.System
.Data
.DataRowAction
3448 Return Me.eventAction
3454 '''Row event argument class
3456 <Global.System
.CodeDom
.Compiler
.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
3457 Public Class CourseGradeRowChangeEvent
3458 Inherits
Global.System
.EventArgs
3460 Private eventRow
As CourseGradeRow
3462 Private eventAction
As Global.System
.Data
.DataRowAction
3464 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3465 Public Sub New(ByVal row
As CourseGradeRow
, ByVal action
As Global.System
.Data
.DataRowAction
)
3468 Me.eventAction
= action
3471 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3472 Public ReadOnly
Property Row() As CourseGradeRow
3478 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3479 Public ReadOnly
Property Action() As Global.System
.Data
.DataRowAction
3481 Return Me.eventAction
3487 '''Row event argument class
3489 <Global.System
.CodeDom
.Compiler
.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
3490 Public Class CourseInstructorRowChangeEvent
3491 Inherits
Global.System
.EventArgs
3493 Private eventRow
As CourseInstructorRow
3495 Private eventAction
As Global.System
.Data
.DataRowAction
3497 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3498 Public Sub New(ByVal row
As CourseInstructorRow
, ByVal action
As Global.System
.Data
.DataRowAction
)
3501 Me.eventAction
= action
3504 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3505 Public ReadOnly
Property Row() As CourseInstructorRow
3511 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3512 Public ReadOnly
Property Action() As Global.System
.Data
.DataRowAction
3514 Return Me.eventAction
3520 '''Row event argument class
3522 <Global.System
.CodeDom
.Compiler
.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
3523 Public Class DepartmentRowChangeEvent
3524 Inherits
Global.System
.EventArgs
3526 Private eventRow
As DepartmentRow
3528 Private eventAction
As Global.System
.Data
.DataRowAction
3530 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3531 Public Sub New(ByVal row
As DepartmentRow
, ByVal action
As Global.System
.Data
.DataRowAction
)
3534 Me.eventAction
= action
3537 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3538 Public ReadOnly
Property Row() As DepartmentRow
3544 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3545 Public ReadOnly
Property Action() As Global.System
.Data
.DataRowAction
3547 Return Me.eventAction
3553 '''Row event argument class
3555 <Global.System
.CodeDom
.Compiler
.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
3556 Public Class OfficeAssignmentRowChangeEvent
3557 Inherits
Global.System
.EventArgs
3559 Private eventRow
As OfficeAssignmentRow
3561 Private eventAction
As Global.System
.Data
.DataRowAction
3563 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3564 Public Sub New(ByVal row
As OfficeAssignmentRow
, ByVal action
As Global.System
.Data
.DataRowAction
)
3567 Me.eventAction
= action
3570 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3571 Public ReadOnly
Property Row() As OfficeAssignmentRow
3577 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3578 Public ReadOnly
Property Action() As Global.System
.Data
.DataRowAction
3580 Return Me.eventAction
3586 '''Row event argument class
3588 <Global.System
.CodeDom
.Compiler
.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
3589 Public Class OnlineCourseRowChangeEvent
3590 Inherits
Global.System
.EventArgs
3592 Private eventRow
As OnlineCourseRow
3594 Private eventAction
As Global.System
.Data
.DataRowAction
3596 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3597 Public Sub New(ByVal row
As OnlineCourseRow
, ByVal action
As Global.System
.Data
.DataRowAction
)
3600 Me.eventAction
= action
3603 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3604 Public ReadOnly
Property Row() As OnlineCourseRow
3610 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3611 Public ReadOnly
Property Action() As Global.System
.Data
.DataRowAction
3613 Return Me.eventAction
3619 '''Row event argument class
3621 <Global.System
.CodeDom
.Compiler
.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
3622 Public Class OnsiteCourseRowChangeEvent
3623 Inherits
Global.System
.EventArgs
3625 Private eventRow
As OnsiteCourseRow
3627 Private eventAction
As Global.System
.Data
.DataRowAction
3629 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3630 Public Sub New(ByVal row
As OnsiteCourseRow
, ByVal action
As Global.System
.Data
.DataRowAction
)
3633 Me.eventAction
= action
3636 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3637 Public ReadOnly
Property Row() As OnsiteCourseRow
3643 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3644 Public ReadOnly
Property Action() As Global.System
.Data
.DataRowAction
3646 Return Me.eventAction
3652 '''Row event argument class
3654 <Global.System
.CodeDom
.Compiler
.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
3655 Public Class PersonRowChangeEvent
3656 Inherits
Global.System
.EventArgs
3658 Private eventRow
As PersonRow
3660 Private eventAction
As Global.System
.Data
.DataRowAction
3662 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3663 Public Sub New(ByVal row
As PersonRow
, ByVal action
As Global.System
.Data
.DataRowAction
)
3666 Me.eventAction
= action
3669 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3670 Public ReadOnly
Property Row() As PersonRow
3676 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3677 Public ReadOnly
Property Action() As Global.System
.Data
.DataRowAction
3679 Return Me.eventAction
3685 Namespace SQLServer2005DBDataSetTableAdapters
3688 '''Represents the connection and commands used to retrieve and save data.
3690 <Global.System
.CodeDom
.Compiler
.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
3691 Global.System
.ComponentModel
.DesignerCategoryAttribute("code"), _
3692 Global.System
.ComponentModel
.ToolboxItem(true), _
3693 Global.System
.ComponentModel
.DataObjectAttribute(true), _
3694 Global.System
.ComponentModel
.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
3695 ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
3696 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter")> _
3697 Partial
Public Class CourseTableAdapter
3698 Inherits
Global.System
.ComponentModel
.Component
3700 Private WithEvents _adapter
As Global.System
.Data
.SqlClient
.SqlDataAdapter
3702 Private _connection
As Global.System
.Data
.SqlClient
.SqlConnection
3704 Private _transaction
As Global.System
.Data
.SqlClient
.SqlTransaction
3706 Private _commandCollection() As Global.System
.Data
.SqlClient
.SqlCommand
3708 Private _clearBeforeFill
As Boolean
3710 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3713 Me.ClearBeforeFill
= true
3716 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3717 Protected
Friend ReadOnly
Property Adapter() As Global.System
.Data
.SqlClient
.SqlDataAdapter
3719 If (Me._adapter Is
Nothing) Then
3726 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3727 Friend Property Connection() As Global.System
.Data
.SqlClient
.SqlConnection
3729 If (Me._connection Is
Nothing) Then
3732 Return Me._connection
3735 Me._connection
= value
3736 If (Not (Me.Adapter
.InsertCommand
) Is
Nothing) Then
3737 Me.Adapter
.InsertCommand
.Connection
= value
3739 If (Not (Me.Adapter
.DeleteCommand
) Is
Nothing) Then
3740 Me.Adapter
.DeleteCommand
.Connection
= value
3742 If (Not (Me.Adapter
.UpdateCommand
) Is
Nothing) Then
3743 Me.Adapter
.UpdateCommand
.Connection
= value
3745 Dim i
As Integer = 0
3746 Do While (i
< Me.CommandCollection
.Length
)
3747 If (Not (Me.CommandCollection(i
)) Is
Nothing) Then
3748 CType(Me.CommandCollection(i
),Global.System
.Data
.SqlClient
.SqlCommand
).Connection
= value
3755 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3756 Friend Property Transaction() As Global.System
.Data
.SqlClient
.SqlTransaction
3758 Return Me._transaction
3761 Me._transaction
= value
3762 Dim i
As Integer = 0
3763 Do While (i
< Me.CommandCollection
.Length
)
3764 Me.CommandCollection(i
).Transaction
= Me._transaction
3767 If ((Not (Me.Adapter
) Is
Nothing) _
3768 AndAlso (Not (Me.Adapter
.DeleteCommand
) Is
Nothing)) Then
3769 Me.Adapter
.DeleteCommand
.Transaction
= Me._transaction
3771 If ((Not (Me.Adapter
) Is
Nothing) _
3772 AndAlso (Not (Me.Adapter
.InsertCommand
) Is
Nothing)) Then
3773 Me.Adapter
.InsertCommand
.Transaction
= Me._transaction
3775 If ((Not (Me.Adapter
) Is
Nothing) _
3776 AndAlso (Not (Me.Adapter
.UpdateCommand
) Is
Nothing)) Then
3777 Me.Adapter
.UpdateCommand
.Transaction
= Me._transaction
3782 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3783 Protected ReadOnly
Property CommandCollection() As Global.System
.Data
.SqlClient
.SqlCommand()
3785 If (Me._commandCollection Is
Nothing) Then
3786 Me.InitCommandCollection
3788 Return Me._commandCollection
3792 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3793 Public Property ClearBeforeFill() As Boolean
3795 Return Me._clearBeforeFill
3798 Me._clearBeforeFill
= value
3802 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3803 Private Sub InitAdapter()
3804 Me._adapter
= New Global.System
.Data
.SqlClient
.SqlDataAdapter
3805 Dim tableMapping
As Global.System
.Data
.Common
.DataTableMapping
= New Global.System
.Data
.Common
.DataTableMapping
3806 tableMapping
.SourceTable
= "Table"
3807 tableMapping
.DataSetTable
= "Course"
3808 tableMapping
.ColumnMappings
.Add("CourseID", "CourseID")
3809 tableMapping
.ColumnMappings
.Add("Title", "Title")
3810 tableMapping
.ColumnMappings
.Add("Credits", "Credits")
3811 tableMapping
.ColumnMappings
.Add("DepartmentID", "DepartmentID")
3812 Me._adapter
.TableMappings
.Add(tableMapping
)
3813 Me._adapter
.DeleteCommand
= New Global.System
.Data
.SqlClient
.SqlCommand
3814 Me._adapter
.DeleteCommand
.Connection
= Me.Connection
3815 Me._adapter
.DeleteCommand
.CommandText
= "DELETE FROM [dbo].[Course] WHERE (([CourseID] = @Original_CourseID) AND ([Title] "& _
3816 "= @Original_Title) AND ([Credits] = @Original_Credits) AND ([DepartmentID] = @Or"& _
3817 "iginal_DepartmentID))"
3818 Me._adapter
.DeleteCommand
.CommandType
= Global.System
.Data
.CommandType
.Text
3819 Me._adapter
.DeleteCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_CourseID", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "CourseID", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
3820 Me._adapter
.DeleteCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_Title", Global.System
.Data
.SqlDbType
.NVarChar
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "Title", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
3821 Me._adapter
.DeleteCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_Credits", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "Credits", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
3822 Me._adapter
.DeleteCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_DepartmentID", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "DepartmentID", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
3823 Me._adapter
.InsertCommand
= New Global.System
.Data
.SqlClient
.SqlCommand
3824 Me._adapter
.InsertCommand
.Connection
= Me.Connection
3825 Me._adapter
.InsertCommand
.CommandText
= "INSERT INTO [dbo].[Course] ([CourseID], [Title], [Credits], [DepartmentID]) VALUE"& _
3826 "S (@CourseID, @Title, @Credits, @DepartmentID);"&Global.Microsoft
.VisualBasic
.ChrW(13)&Global.Microsoft
.VisualBasic
.ChrW(10)&"SELECT CourseID, Title, Credits"& _
3827 ", DepartmentID FROM Course WHERE (CourseID = @CourseID)"
3828 Me._adapter
.InsertCommand
.CommandType
= Global.System
.Data
.CommandType
.Text
3829 Me._adapter
.InsertCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@CourseID", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "CourseID", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
3830 Me._adapter
.InsertCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Title", Global.System
.Data
.SqlDbType
.NVarChar
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "Title", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
3831 Me._adapter
.InsertCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Credits", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "Credits", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
3832 Me._adapter
.InsertCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@DepartmentID", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "DepartmentID", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
3833 Me._adapter
.UpdateCommand
= New Global.System
.Data
.SqlClient
.SqlCommand
3834 Me._adapter
.UpdateCommand
.Connection
= Me.Connection
3835 Me._adapter
.UpdateCommand
.CommandText
= "UPDATE [dbo].[Course] SET [CourseID] = @CourseID, [Title] = @Title, [Credits] = @"& _
3836 "Credits, [DepartmentID] = @DepartmentID WHERE (([CourseID] = @Original_CourseID)"& _
3837 " AND ([Title] = @Original_Title) AND ([Credits] = @Original_Credits) AND ([Depar"& _
3838 "tmentID] = @Original_DepartmentID));"&Global.Microsoft
.VisualBasic
.ChrW(13)&Global.Microsoft
.VisualBasic
.ChrW(10)&"SELECT CourseID, Title, Credits, Departmen"& _
3839 "tID FROM Course WHERE (CourseID = @CourseID)"
3840 Me._adapter
.UpdateCommand
.CommandType
= Global.System
.Data
.CommandType
.Text
3841 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@CourseID", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "CourseID", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
3842 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Title", Global.System
.Data
.SqlDbType
.NVarChar
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "Title", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
3843 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Credits", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "Credits", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
3844 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@DepartmentID", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "DepartmentID", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
3845 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_CourseID", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "CourseID", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
3846 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_Title", Global.System
.Data
.SqlDbType
.NVarChar
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "Title", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
3847 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_Credits", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "Credits", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
3848 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_DepartmentID", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "DepartmentID", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
3851 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3852 Private Sub InitConnection()
3853 Me._connection
= New Global.System
.Data
.SqlClient
.SqlConnection
3854 Me._connection
.ConnectionString
= Global.VBUseADONET
.My
.MySettings
.Default
.SQLServer2005DBConnectionString
3857 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
3858 Private Sub InitCommandCollection()
3859 Me._commandCollection
= New Global.System
.Data
.SqlClient
.SqlCommand(0) {}
3860 Me._commandCollection(0) = New Global.System
.Data
.SqlClient
.SqlCommand
3861 Me._commandCollection(0).Connection
= Me.Connection
3862 Me._commandCollection(0).CommandText
= "SELECT CourseID, Title, Credits, DepartmentID FROM dbo.Course"
3863 Me._commandCollection(0).CommandType
= Global.System
.Data
.CommandType
.Text
3866 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
3867 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter"), _
3868 Global.System
.ComponentModel
.DataObjectMethodAttribute(Global.System
.ComponentModel
.DataObjectMethodType
.Fill
, true)> _
3869 Public Overloads Overridable
Function Fill(ByVal dataTable
As SQLServer2005DBDataSet
.CourseDataTable
) As Integer
3870 Me.Adapter
.SelectCommand
= Me.CommandCollection(0)
3871 If (Me.ClearBeforeFill
= true) Then
3874 Dim returnValue
As Integer = Me.Adapter
.Fill(dataTable
)
3878 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
3879 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter"), _
3880 Global.System
.ComponentModel
.DataObjectMethodAttribute(Global.System
.ComponentModel
.DataObjectMethodType
.[Select], true)> _
3881 Public Overloads Overridable
Function GetData() As SQLServer2005DBDataSet
.CourseDataTable
3882 Me.Adapter
.SelectCommand
= Me.CommandCollection(0)
3883 Dim dataTable
As SQLServer2005DBDataSet
.CourseDataTable
= New SQLServer2005DBDataSet
.CourseDataTable
3884 Me.Adapter
.Fill(dataTable
)
3888 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
3889 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter")> _
3890 Public Overloads Overridable
Function Update(ByVal dataTable
As SQLServer2005DBDataSet
.CourseDataTable
) As Integer
3891 Return Me.Adapter
.Update(dataTable
)
3894 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
3895 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter")> _
3896 Public Overloads Overridable
Function Update(ByVal dataSet
As SQLServer2005DBDataSet
) As Integer
3897 Return Me.Adapter
.Update(dataSet
, "Course")
3900 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
3901 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter")> _
3902 Public Overloads Overridable
Function Update(ByVal dataRow
As Global.System
.Data
.DataRow
) As Integer
3903 Return Me.Adapter
.Update(New Global.System
.Data
.DataRow() {dataRow
})
3906 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
3907 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter")> _
3908 Public Overloads Overridable
Function Update(ByVal dataRows() As Global.System
.Data
.DataRow
) As Integer
3909 Return Me.Adapter
.Update(dataRows
)
3912 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
3913 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter"), _
3914 Global.System
.ComponentModel
.DataObjectMethodAttribute(Global.System
.ComponentModel
.DataObjectMethodType
.Delete
, true)> _
3915 Public Overloads Overridable
Function Delete(ByVal Original_CourseID
As Integer, ByVal Original_Title
As String, ByVal Original_Credits
As Integer, ByVal Original_DepartmentID
As Integer) As Integer
3916 Me.Adapter
.DeleteCommand
.Parameters(0).Value
= CType(Original_CourseID
,Integer)
3917 If (Original_Title Is
Nothing) Then
3918 Throw
New Global.System
.ArgumentNullException("Original_Title")
3920 Me.Adapter
.DeleteCommand
.Parameters(1).Value
= CType(Original_Title
,String)
3922 Me.Adapter
.DeleteCommand
.Parameters(2).Value
= CType(Original_Credits
,Integer)
3923 Me.Adapter
.DeleteCommand
.Parameters(3).Value
= CType(Original_DepartmentID
,Integer)
3924 Dim previousConnectionState
As Global.System
.Data
.ConnectionState
= Me.Adapter
.DeleteCommand
.Connection
.State
3925 If ((Me.Adapter
.DeleteCommand
.Connection
.State
And Global.System
.Data
.ConnectionState
.Open
) _
3926 <> Global.System
.Data
.ConnectionState
.Open
) Then
3927 Me.Adapter
.DeleteCommand
.Connection
.Open
3930 Dim returnValue
As Integer = Me.Adapter
.DeleteCommand
.ExecuteNonQuery
3933 If (previousConnectionState
= Global.System
.Data
.ConnectionState
.Closed
) Then
3934 Me.Adapter
.DeleteCommand
.Connection
.Close
3939 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
3940 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter"), _
3941 Global.System
.ComponentModel
.DataObjectMethodAttribute(Global.System
.ComponentModel
.DataObjectMethodType
.Insert
, true)> _
3942 Public Overloads Overridable
Function Insert(ByVal CourseID
As Integer, ByVal Title
As String, ByVal Credits
As Integer, ByVal DepartmentID
As Integer) As Integer
3943 Me.Adapter
.InsertCommand
.Parameters(0).Value
= CType(CourseID
,Integer)
3944 If (Title Is
Nothing) Then
3945 Throw
New Global.System
.ArgumentNullException("Title")
3947 Me.Adapter
.InsertCommand
.Parameters(1).Value
= CType(Title
,String)
3949 Me.Adapter
.InsertCommand
.Parameters(2).Value
= CType(Credits
,Integer)
3950 Me.Adapter
.InsertCommand
.Parameters(3).Value
= CType(DepartmentID
,Integer)
3951 Dim previousConnectionState
As Global.System
.Data
.ConnectionState
= Me.Adapter
.InsertCommand
.Connection
.State
3952 If ((Me.Adapter
.InsertCommand
.Connection
.State
And Global.System
.Data
.ConnectionState
.Open
) _
3953 <> Global.System
.Data
.ConnectionState
.Open
) Then
3954 Me.Adapter
.InsertCommand
.Connection
.Open
3957 Dim returnValue
As Integer = Me.Adapter
.InsertCommand
.ExecuteNonQuery
3960 If (previousConnectionState
= Global.System
.Data
.ConnectionState
.Closed
) Then
3961 Me.Adapter
.InsertCommand
.Connection
.Close
3966 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
3967 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter"), _
3968 Global.System
.ComponentModel
.DataObjectMethodAttribute(Global.System
.ComponentModel
.DataObjectMethodType
.Update
, true)> _
3969 Public Overloads Overridable
Function Update(ByVal CourseID
As Integer, ByVal Title
As String, ByVal Credits
As Integer, ByVal DepartmentID
As Integer, ByVal Original_CourseID
As Integer, ByVal Original_Title
As String, ByVal Original_Credits
As Integer, ByVal Original_DepartmentID
As Integer) As Integer
3970 Me.Adapter
.UpdateCommand
.Parameters(0).Value
= CType(CourseID
,Integer)
3971 If (Title Is
Nothing) Then
3972 Throw
New Global.System
.ArgumentNullException("Title")
3974 Me.Adapter
.UpdateCommand
.Parameters(1).Value
= CType(Title
,String)
3976 Me.Adapter
.UpdateCommand
.Parameters(2).Value
= CType(Credits
,Integer)
3977 Me.Adapter
.UpdateCommand
.Parameters(3).Value
= CType(DepartmentID
,Integer)
3978 Me.Adapter
.UpdateCommand
.Parameters(4).Value
= CType(Original_CourseID
,Integer)
3979 If (Original_Title Is
Nothing) Then
3980 Throw
New Global.System
.ArgumentNullException("Original_Title")
3982 Me.Adapter
.UpdateCommand
.Parameters(5).Value
= CType(Original_Title
,String)
3984 Me.Adapter
.UpdateCommand
.Parameters(6).Value
= CType(Original_Credits
,Integer)
3985 Me.Adapter
.UpdateCommand
.Parameters(7).Value
= CType(Original_DepartmentID
,Integer)
3986 Dim previousConnectionState
As Global.System
.Data
.ConnectionState
= Me.Adapter
.UpdateCommand
.Connection
.State
3987 If ((Me.Adapter
.UpdateCommand
.Connection
.State
And Global.System
.Data
.ConnectionState
.Open
) _
3988 <> Global.System
.Data
.ConnectionState
.Open
) Then
3989 Me.Adapter
.UpdateCommand
.Connection
.Open
3992 Dim returnValue
As Integer = Me.Adapter
.UpdateCommand
.ExecuteNonQuery
3995 If (previousConnectionState
= Global.System
.Data
.ConnectionState
.Closed
) Then
3996 Me.Adapter
.UpdateCommand
.Connection
.Close
4001 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
4002 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter"), _
4003 Global.System
.ComponentModel
.DataObjectMethodAttribute(Global.System
.ComponentModel
.DataObjectMethodType
.Update
, true)> _
4004 Public Overloads Overridable
Function Update(ByVal Title
As String, ByVal Credits
As Integer, ByVal DepartmentID
As Integer, ByVal Original_CourseID
As Integer, ByVal Original_Title
As String, ByVal Original_Credits
As Integer, ByVal Original_DepartmentID
As Integer) As Integer
4005 Return Me.Update(Original_CourseID
, Title
, Credits
, DepartmentID
, Original_CourseID
, Original_Title
, Original_Credits
, Original_DepartmentID
)
4010 '''Represents the connection and commands used to retrieve and save data.
4012 <Global.System
.CodeDom
.Compiler
.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
4013 Global.System
.ComponentModel
.DesignerCategoryAttribute("code"), _
4014 Global.System
.ComponentModel
.ToolboxItem(true), _
4015 Global.System
.ComponentModel
.DataObjectAttribute(true), _
4016 Global.System
.ComponentModel
.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
4017 ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
4018 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter")> _
4019 Partial
Public Class CourseGradeTableAdapter
4020 Inherits
Global.System
.ComponentModel
.Component
4022 Private WithEvents _adapter
As Global.System
.Data
.SqlClient
.SqlDataAdapter
4024 Private _connection
As Global.System
.Data
.SqlClient
.SqlConnection
4026 Private _transaction
As Global.System
.Data
.SqlClient
.SqlTransaction
4028 Private _commandCollection() As Global.System
.Data
.SqlClient
.SqlCommand
4030 Private _clearBeforeFill
As Boolean
4032 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
4035 Me.ClearBeforeFill
= true
4038 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
4039 Protected
Friend ReadOnly
Property Adapter() As Global.System
.Data
.SqlClient
.SqlDataAdapter
4041 If (Me._adapter Is
Nothing) Then
4048 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
4049 Friend Property Connection() As Global.System
.Data
.SqlClient
.SqlConnection
4051 If (Me._connection Is
Nothing) Then
4054 Return Me._connection
4057 Me._connection
= value
4058 If (Not (Me.Adapter
.InsertCommand
) Is
Nothing) Then
4059 Me.Adapter
.InsertCommand
.Connection
= value
4061 If (Not (Me.Adapter
.DeleteCommand
) Is
Nothing) Then
4062 Me.Adapter
.DeleteCommand
.Connection
= value
4064 If (Not (Me.Adapter
.UpdateCommand
) Is
Nothing) Then
4065 Me.Adapter
.UpdateCommand
.Connection
= value
4067 Dim i
As Integer = 0
4068 Do While (i
< Me.CommandCollection
.Length
)
4069 If (Not (Me.CommandCollection(i
)) Is
Nothing) Then
4070 CType(Me.CommandCollection(i
),Global.System
.Data
.SqlClient
.SqlCommand
).Connection
= value
4077 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
4078 Friend Property Transaction() As Global.System
.Data
.SqlClient
.SqlTransaction
4080 Return Me._transaction
4083 Me._transaction
= value
4084 Dim i
As Integer = 0
4085 Do While (i
< Me.CommandCollection
.Length
)
4086 Me.CommandCollection(i
).Transaction
= Me._transaction
4089 If ((Not (Me.Adapter
) Is
Nothing) _
4090 AndAlso (Not (Me.Adapter
.DeleteCommand
) Is
Nothing)) Then
4091 Me.Adapter
.DeleteCommand
.Transaction
= Me._transaction
4093 If ((Not (Me.Adapter
) Is
Nothing) _
4094 AndAlso (Not (Me.Adapter
.InsertCommand
) Is
Nothing)) Then
4095 Me.Adapter
.InsertCommand
.Transaction
= Me._transaction
4097 If ((Not (Me.Adapter
) Is
Nothing) _
4098 AndAlso (Not (Me.Adapter
.UpdateCommand
) Is
Nothing)) Then
4099 Me.Adapter
.UpdateCommand
.Transaction
= Me._transaction
4104 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
4105 Protected ReadOnly
Property CommandCollection() As Global.System
.Data
.SqlClient
.SqlCommand()
4107 If (Me._commandCollection Is
Nothing) Then
4108 Me.InitCommandCollection
4110 Return Me._commandCollection
4114 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
4115 Public Property ClearBeforeFill() As Boolean
4117 Return Me._clearBeforeFill
4120 Me._clearBeforeFill
= value
4124 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
4125 Private Sub InitAdapter()
4126 Me._adapter
= New Global.System
.Data
.SqlClient
.SqlDataAdapter
4127 Dim tableMapping
As Global.System
.Data
.Common
.DataTableMapping
= New Global.System
.Data
.Common
.DataTableMapping
4128 tableMapping
.SourceTable
= "Table"
4129 tableMapping
.DataSetTable
= "CourseGrade"
4130 tableMapping
.ColumnMappings
.Add("EnrollmentID", "EnrollmentID")
4131 tableMapping
.ColumnMappings
.Add("CourseID", "CourseID")
4132 tableMapping
.ColumnMappings
.Add("StudentID", "StudentID")
4133 tableMapping
.ColumnMappings
.Add("Grade", "Grade")
4134 Me._adapter
.TableMappings
.Add(tableMapping
)
4135 Me._adapter
.DeleteCommand
= New Global.System
.Data
.SqlClient
.SqlCommand
4136 Me._adapter
.DeleteCommand
.Connection
= Me.Connection
4137 Me._adapter
.DeleteCommand
.CommandText
= "DELETE FROM [dbo].[CourseGrade] WHERE (([EnrollmentID] = @Original_EnrollmentID) "& _
4138 "AND ([CourseID] = @Original_CourseID) AND ([StudentID] = @Original_StudentID) AN"& _
4139 "D ((@IsNull_Grade = 1 AND [Grade] IS NULL) OR ([Grade] = @Original_Grade)))"
4140 Me._adapter
.DeleteCommand
.CommandType
= Global.System
.Data
.CommandType
.Text
4141 Me._adapter
.DeleteCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_EnrollmentID", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "EnrollmentID", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
4142 Me._adapter
.DeleteCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_CourseID", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "CourseID", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
4143 Me._adapter
.DeleteCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_StudentID", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "StudentID", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
4144 Me._adapter
.DeleteCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@IsNull_Grade", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "Grade", Global.System
.Data
.DataRowVersion
.Original
, true, Nothing, "", "", ""))
4145 Me._adapter
.DeleteCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_Grade", Global.System
.Data
.SqlDbType
.[Decimal], 0, Global.System
.Data
.ParameterDirection
.Input
, 3, 2, "Grade", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
4146 Me._adapter
.InsertCommand
= New Global.System
.Data
.SqlClient
.SqlCommand
4147 Me._adapter
.InsertCommand
.Connection
= Me.Connection
4148 Me._adapter
.InsertCommand
.CommandText
= "INSERT INTO [dbo].[CourseGrade] ([CourseID], [StudentID], [Grade]) VALUES (@Cours"& _
4149 "eID, @StudentID, @Grade);"&Global.Microsoft
.VisualBasic
.ChrW(13)&Global.Microsoft
.VisualBasic
.ChrW(10)&"SELECT EnrollmentID, CourseID, StudentID, Grade FROM "& _
4150 "CourseGrade WHERE (EnrollmentID = SCOPE_IDENTITY())"
4151 Me._adapter
.InsertCommand
.CommandType
= Global.System
.Data
.CommandType
.Text
4152 Me._adapter
.InsertCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@CourseID", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "CourseID", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
4153 Me._adapter
.InsertCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@StudentID", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "StudentID", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
4154 Me._adapter
.InsertCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Grade", Global.System
.Data
.SqlDbType
.[Decimal], 0, Global.System
.Data
.ParameterDirection
.Input
, 3, 2, "Grade", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
4155 Me._adapter
.UpdateCommand
= New Global.System
.Data
.SqlClient
.SqlCommand
4156 Me._adapter
.UpdateCommand
.Connection
= Me.Connection
4157 Me._adapter
.UpdateCommand
.CommandText
= "UPDATE [dbo].[CourseGrade] SET [CourseID] = @CourseID, [StudentID] = @StudentID, "& _
4158 "[Grade] = @Grade WHERE (([EnrollmentID] = @Original_EnrollmentID) AND ([CourseID"& _
4159 "] = @Original_CourseID) AND ([StudentID] = @Original_StudentID) AND ((@IsNull_Gr"& _
4160 "ade = 1 AND [Grade] IS NULL) OR ([Grade] = @Original_Grade)));"&Global.Microsoft
.VisualBasic
.ChrW(13)&Global.Microsoft
.VisualBasic
.ChrW(10)&"SELECT Enrollmen"& _
4161 "tID, CourseID, StudentID, Grade FROM CourseGrade WHERE (EnrollmentID = @Enrollme"& _
4163 Me._adapter
.UpdateCommand
.CommandType
= Global.System
.Data
.CommandType
.Text
4164 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@CourseID", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "CourseID", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
4165 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@StudentID", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "StudentID", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
4166 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Grade", Global.System
.Data
.SqlDbType
.[Decimal], 0, Global.System
.Data
.ParameterDirection
.Input
, 3, 2, "Grade", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
4167 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_EnrollmentID", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "EnrollmentID", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
4168 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_CourseID", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "CourseID", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
4169 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_StudentID", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "StudentID", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
4170 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@IsNull_Grade", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "Grade", Global.System
.Data
.DataRowVersion
.Original
, true, Nothing, "", "", ""))
4171 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_Grade", Global.System
.Data
.SqlDbType
.[Decimal], 0, Global.System
.Data
.ParameterDirection
.Input
, 3, 2, "Grade", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
4172 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@EnrollmentID", Global.System
.Data
.SqlDbType
.Int
, 4, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "EnrollmentID", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
4175 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
4176 Private Sub InitConnection()
4177 Me._connection
= New Global.System
.Data
.SqlClient
.SqlConnection
4178 Me._connection
.ConnectionString
= Global.VBUseADONET
.My
.MySettings
.Default
.SQLServer2005DBConnectionString
4181 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
4182 Private Sub InitCommandCollection()
4183 Me._commandCollection
= New Global.System
.Data
.SqlClient
.SqlCommand(0) {}
4184 Me._commandCollection(0) = New Global.System
.Data
.SqlClient
.SqlCommand
4185 Me._commandCollection(0).Connection
= Me.Connection
4186 Me._commandCollection(0).CommandText
= "SELECT EnrollmentID, CourseID, StudentID, Grade FROM dbo.CourseGrade"
4187 Me._commandCollection(0).CommandType
= Global.System
.Data
.CommandType
.Text
4190 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
4191 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter"), _
4192 Global.System
.ComponentModel
.DataObjectMethodAttribute(Global.System
.ComponentModel
.DataObjectMethodType
.Fill
, true)> _
4193 Public Overloads Overridable
Function Fill(ByVal dataTable
As SQLServer2005DBDataSet
.CourseGradeDataTable
) As Integer
4194 Me.Adapter
.SelectCommand
= Me.CommandCollection(0)
4195 If (Me.ClearBeforeFill
= true) Then
4198 Dim returnValue
As Integer = Me.Adapter
.Fill(dataTable
)
4202 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
4203 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter"), _
4204 Global.System
.ComponentModel
.DataObjectMethodAttribute(Global.System
.ComponentModel
.DataObjectMethodType
.[Select], true)> _
4205 Public Overloads Overridable
Function GetData() As SQLServer2005DBDataSet
.CourseGradeDataTable
4206 Me.Adapter
.SelectCommand
= Me.CommandCollection(0)
4207 Dim dataTable
As SQLServer2005DBDataSet
.CourseGradeDataTable
= New SQLServer2005DBDataSet
.CourseGradeDataTable
4208 Me.Adapter
.Fill(dataTable
)
4212 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
4213 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter")> _
4214 Public Overloads Overridable
Function Update(ByVal dataTable
As SQLServer2005DBDataSet
.CourseGradeDataTable
) As Integer
4215 Return Me.Adapter
.Update(dataTable
)
4218 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
4219 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter")> _
4220 Public Overloads Overridable
Function Update(ByVal dataSet
As SQLServer2005DBDataSet
) As Integer
4221 Return Me.Adapter
.Update(dataSet
, "CourseGrade")
4224 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
4225 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter")> _
4226 Public Overloads Overridable
Function Update(ByVal dataRow
As Global.System
.Data
.DataRow
) As Integer
4227 Return Me.Adapter
.Update(New Global.System
.Data
.DataRow() {dataRow
})
4230 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
4231 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter")> _
4232 Public Overloads Overridable
Function Update(ByVal dataRows() As Global.System
.Data
.DataRow
) As Integer
4233 Return Me.Adapter
.Update(dataRows
)
4236 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
4237 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter"), _
4238 Global.System
.ComponentModel
.DataObjectMethodAttribute(Global.System
.ComponentModel
.DataObjectMethodType
.Delete
, true)> _
4239 Public Overloads Overridable
Function Delete(ByVal Original_EnrollmentID
As Integer, ByVal Original_CourseID
As Integer, ByVal Original_StudentID
As Integer, ByVal Original_Grade
As Global.System
.Nullable(Of
Decimal)) As Integer
4240 Me.Adapter
.DeleteCommand
.Parameters(0).Value
= CType(Original_EnrollmentID
,Integer)
4241 Me.Adapter
.DeleteCommand
.Parameters(1).Value
= CType(Original_CourseID
,Integer)
4242 Me.Adapter
.DeleteCommand
.Parameters(2).Value
= CType(Original_StudentID
,Integer)
4243 If (Original_Grade
.HasValue
= true) Then
4244 Me.Adapter
.DeleteCommand
.Parameters(3).Value
= CType(0,Object)
4245 Me.Adapter
.DeleteCommand
.Parameters(4).Value
= CType(Original_Grade
.Value
,Decimal)
4247 Me.Adapter
.DeleteCommand
.Parameters(3).Value
= CType(1,Object)
4248 Me.Adapter
.DeleteCommand
.Parameters(4).Value
= Global.System
.DBNull
.Value
4250 Dim previousConnectionState
As Global.System
.Data
.ConnectionState
= Me.Adapter
.DeleteCommand
.Connection
.State
4251 If ((Me.Adapter
.DeleteCommand
.Connection
.State
And Global.System
.Data
.ConnectionState
.Open
) _
4252 <> Global.System
.Data
.ConnectionState
.Open
) Then
4253 Me.Adapter
.DeleteCommand
.Connection
.Open
4256 Dim returnValue
As Integer = Me.Adapter
.DeleteCommand
.ExecuteNonQuery
4259 If (previousConnectionState
= Global.System
.Data
.ConnectionState
.Closed
) Then
4260 Me.Adapter
.DeleteCommand
.Connection
.Close
4265 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
4266 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter"), _
4267 Global.System
.ComponentModel
.DataObjectMethodAttribute(Global.System
.ComponentModel
.DataObjectMethodType
.Insert
, true)> _
4268 Public Overloads Overridable
Function Insert(ByVal CourseID
As Integer, ByVal StudentID
As Integer, ByVal Grade
As Global.System
.Nullable(Of
Decimal)) As Integer
4269 Me.Adapter
.InsertCommand
.Parameters(0).Value
= CType(CourseID
,Integer)
4270 Me.Adapter
.InsertCommand
.Parameters(1).Value
= CType(StudentID
,Integer)
4271 If (Grade
.HasValue
= true) Then
4272 Me.Adapter
.InsertCommand
.Parameters(2).Value
= CType(Grade
.Value
,Decimal)
4274 Me.Adapter
.InsertCommand
.Parameters(2).Value
= Global.System
.DBNull
.Value
4276 Dim previousConnectionState
As Global.System
.Data
.ConnectionState
= Me.Adapter
.InsertCommand
.Connection
.State
4277 If ((Me.Adapter
.InsertCommand
.Connection
.State
And Global.System
.Data
.ConnectionState
.Open
) _
4278 <> Global.System
.Data
.ConnectionState
.Open
) Then
4279 Me.Adapter
.InsertCommand
.Connection
.Open
4282 Dim returnValue
As Integer = Me.Adapter
.InsertCommand
.ExecuteNonQuery
4285 If (previousConnectionState
= Global.System
.Data
.ConnectionState
.Closed
) Then
4286 Me.Adapter
.InsertCommand
.Connection
.Close
4291 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
4292 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter"), _
4293 Global.System
.ComponentModel
.DataObjectMethodAttribute(Global.System
.ComponentModel
.DataObjectMethodType
.Update
, true)> _
4294 Public Overloads Overridable
Function Update(ByVal CourseID
As Integer, ByVal StudentID
As Integer, ByVal Grade
As Global.System
.Nullable(Of
Decimal), ByVal Original_EnrollmentID
As Integer, ByVal Original_CourseID
As Integer, ByVal Original_StudentID
As Integer, ByVal Original_Grade
As Global.System
.Nullable(Of
Decimal), ByVal EnrollmentID
As Integer) As Integer
4295 Me.Adapter
.UpdateCommand
.Parameters(0).Value
= CType(CourseID
,Integer)
4296 Me.Adapter
.UpdateCommand
.Parameters(1).Value
= CType(StudentID
,Integer)
4297 If (Grade
.HasValue
= true) Then
4298 Me.Adapter
.UpdateCommand
.Parameters(2).Value
= CType(Grade
.Value
,Decimal)
4300 Me.Adapter
.UpdateCommand
.Parameters(2).Value
= Global.System
.DBNull
.Value
4302 Me.Adapter
.UpdateCommand
.Parameters(3).Value
= CType(Original_EnrollmentID
,Integer)
4303 Me.Adapter
.UpdateCommand
.Parameters(4).Value
= CType(Original_CourseID
,Integer)
4304 Me.Adapter
.UpdateCommand
.Parameters(5).Value
= CType(Original_StudentID
,Integer)
4305 If (Original_Grade
.HasValue
= true) Then
4306 Me.Adapter
.UpdateCommand
.Parameters(6).Value
= CType(0,Object)
4307 Me.Adapter
.UpdateCommand
.Parameters(7).Value
= CType(Original_Grade
.Value
,Decimal)
4309 Me.Adapter
.UpdateCommand
.Parameters(6).Value
= CType(1,Object)
4310 Me.Adapter
.UpdateCommand
.Parameters(7).Value
= Global.System
.DBNull
.Value
4312 Me.Adapter
.UpdateCommand
.Parameters(8).Value
= CType(EnrollmentID
,Integer)
4313 Dim previousConnectionState
As Global.System
.Data
.ConnectionState
= Me.Adapter
.UpdateCommand
.Connection
.State
4314 If ((Me.Adapter
.UpdateCommand
.Connection
.State
And Global.System
.Data
.ConnectionState
.Open
) _
4315 <> Global.System
.Data
.ConnectionState
.Open
) Then
4316 Me.Adapter
.UpdateCommand
.Connection
.Open
4319 Dim returnValue
As Integer = Me.Adapter
.UpdateCommand
.ExecuteNonQuery
4322 If (previousConnectionState
= Global.System
.Data
.ConnectionState
.Closed
) Then
4323 Me.Adapter
.UpdateCommand
.Connection
.Close
4328 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
4329 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter"), _
4330 Global.System
.ComponentModel
.DataObjectMethodAttribute(Global.System
.ComponentModel
.DataObjectMethodType
.Update
, true)> _
4331 Public Overloads Overridable
Function Update(ByVal CourseID
As Integer, ByVal StudentID
As Integer, ByVal Grade
As Global.System
.Nullable(Of
Decimal), ByVal Original_EnrollmentID
As Integer, ByVal Original_CourseID
As Integer, ByVal Original_StudentID
As Integer, ByVal Original_Grade
As Global.System
.Nullable(Of
Decimal)) As Integer
4332 Return Me.Update(CourseID
, StudentID
, Grade
, Original_EnrollmentID
, Original_CourseID
, Original_StudentID
, Original_Grade
, Original_EnrollmentID
)
4337 '''Represents the connection and commands used to retrieve and save data.
4339 <Global.System
.CodeDom
.Compiler
.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
4340 Global.System
.ComponentModel
.DesignerCategoryAttribute("code"), _
4341 Global.System
.ComponentModel
.ToolboxItem(true), _
4342 Global.System
.ComponentModel
.DataObjectAttribute(true), _
4343 Global.System
.ComponentModel
.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
4344 ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
4345 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter")> _
4346 Partial
Public Class CourseInstructorTableAdapter
4347 Inherits
Global.System
.ComponentModel
.Component
4349 Private WithEvents _adapter
As Global.System
.Data
.SqlClient
.SqlDataAdapter
4351 Private _connection
As Global.System
.Data
.SqlClient
.SqlConnection
4353 Private _transaction
As Global.System
.Data
.SqlClient
.SqlTransaction
4355 Private _commandCollection() As Global.System
.Data
.SqlClient
.SqlCommand
4357 Private _clearBeforeFill
As Boolean
4359 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
4362 Me.ClearBeforeFill
= true
4365 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
4366 Protected
Friend ReadOnly
Property Adapter() As Global.System
.Data
.SqlClient
.SqlDataAdapter
4368 If (Me._adapter Is
Nothing) Then
4375 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
4376 Friend Property Connection() As Global.System
.Data
.SqlClient
.SqlConnection
4378 If (Me._connection Is
Nothing) Then
4381 Return Me._connection
4384 Me._connection
= value
4385 If (Not (Me.Adapter
.InsertCommand
) Is
Nothing) Then
4386 Me.Adapter
.InsertCommand
.Connection
= value
4388 If (Not (Me.Adapter
.DeleteCommand
) Is
Nothing) Then
4389 Me.Adapter
.DeleteCommand
.Connection
= value
4391 If (Not (Me.Adapter
.UpdateCommand
) Is
Nothing) Then
4392 Me.Adapter
.UpdateCommand
.Connection
= value
4394 Dim i
As Integer = 0
4395 Do While (i
< Me.CommandCollection
.Length
)
4396 If (Not (Me.CommandCollection(i
)) Is
Nothing) Then
4397 CType(Me.CommandCollection(i
),Global.System
.Data
.SqlClient
.SqlCommand
).Connection
= value
4404 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
4405 Friend Property Transaction() As Global.System
.Data
.SqlClient
.SqlTransaction
4407 Return Me._transaction
4410 Me._transaction
= value
4411 Dim i
As Integer = 0
4412 Do While (i
< Me.CommandCollection
.Length
)
4413 Me.CommandCollection(i
).Transaction
= Me._transaction
4416 If ((Not (Me.Adapter
) Is
Nothing) _
4417 AndAlso (Not (Me.Adapter
.DeleteCommand
) Is
Nothing)) Then
4418 Me.Adapter
.DeleteCommand
.Transaction
= Me._transaction
4420 If ((Not (Me.Adapter
) Is
Nothing) _
4421 AndAlso (Not (Me.Adapter
.InsertCommand
) Is
Nothing)) Then
4422 Me.Adapter
.InsertCommand
.Transaction
= Me._transaction
4424 If ((Not (Me.Adapter
) Is
Nothing) _
4425 AndAlso (Not (Me.Adapter
.UpdateCommand
) Is
Nothing)) Then
4426 Me.Adapter
.UpdateCommand
.Transaction
= Me._transaction
4431 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
4432 Protected ReadOnly
Property CommandCollection() As Global.System
.Data
.SqlClient
.SqlCommand()
4434 If (Me._commandCollection Is
Nothing) Then
4435 Me.InitCommandCollection
4437 Return Me._commandCollection
4441 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
4442 Public Property ClearBeforeFill() As Boolean
4444 Return Me._clearBeforeFill
4447 Me._clearBeforeFill
= value
4451 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
4452 Private Sub InitAdapter()
4453 Me._adapter
= New Global.System
.Data
.SqlClient
.SqlDataAdapter
4454 Dim tableMapping
As Global.System
.Data
.Common
.DataTableMapping
= New Global.System
.Data
.Common
.DataTableMapping
4455 tableMapping
.SourceTable
= "Table"
4456 tableMapping
.DataSetTable
= "CourseInstructor"
4457 tableMapping
.ColumnMappings
.Add("CourseID", "CourseID")
4458 tableMapping
.ColumnMappings
.Add("PersonID", "PersonID")
4459 Me._adapter
.TableMappings
.Add(tableMapping
)
4460 Me._adapter
.DeleteCommand
= New Global.System
.Data
.SqlClient
.SqlCommand
4461 Me._adapter
.DeleteCommand
.Connection
= Me.Connection
4462 Me._adapter
.DeleteCommand
.CommandText
= "DELETE FROM [dbo].[CourseInstructor] WHERE (([CourseID] = @Original_CourseID) AND"& _
4463 " ([PersonID] = @Original_PersonID))"
4464 Me._adapter
.DeleteCommand
.CommandType
= Global.System
.Data
.CommandType
.Text
4465 Me._adapter
.DeleteCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_CourseID", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "CourseID", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
4466 Me._adapter
.DeleteCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_PersonID", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "PersonID", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
4467 Me._adapter
.InsertCommand
= New Global.System
.Data
.SqlClient
.SqlCommand
4468 Me._adapter
.InsertCommand
.Connection
= Me.Connection
4469 Me._adapter
.InsertCommand
.CommandText
= "INSERT INTO [dbo].[CourseInstructor] ([CourseID], [PersonID]) VALUES (@CourseID, "& _
4470 "@PersonID);"&Global.Microsoft
.VisualBasic
.ChrW(13)&Global.Microsoft
.VisualBasic
.ChrW(10)&"SELECT CourseID, PersonID FROM CourseInstructor WHERE (CourseID = @"& _
4471 "CourseID) AND (PersonID = @PersonID)"
4472 Me._adapter
.InsertCommand
.CommandType
= Global.System
.Data
.CommandType
.Text
4473 Me._adapter
.InsertCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@CourseID", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "CourseID", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
4474 Me._adapter
.InsertCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@PersonID", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "PersonID", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
4475 Me._adapter
.UpdateCommand
= New Global.System
.Data
.SqlClient
.SqlCommand
4476 Me._adapter
.UpdateCommand
.Connection
= Me.Connection
4477 Me._adapter
.UpdateCommand
.CommandText
= "UPDATE [dbo].[CourseInstructor] SET [CourseID] = @CourseID, [PersonID] = @PersonI"& _
4478 "D WHERE (([CourseID] = @Original_CourseID) AND ([PersonID] = @Original_PersonID)"& _
4479 ");"&Global.Microsoft
.VisualBasic
.ChrW(13)&Global.Microsoft
.VisualBasic
.ChrW(10)&"SELECT CourseID, PersonID FROM CourseInstructor WHERE (CourseID = @CourseID)"& _
4480 " AND (PersonID = @PersonID)"
4481 Me._adapter
.UpdateCommand
.CommandType
= Global.System
.Data
.CommandType
.Text
4482 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@CourseID", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "CourseID", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
4483 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@PersonID", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "PersonID", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
4484 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_CourseID", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "CourseID", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
4485 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_PersonID", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "PersonID", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
4488 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
4489 Private Sub InitConnection()
4490 Me._connection
= New Global.System
.Data
.SqlClient
.SqlConnection
4491 Me._connection
.ConnectionString
= Global.VBUseADONET
.My
.MySettings
.Default
.SQLServer2005DBConnectionString
4494 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
4495 Private Sub InitCommandCollection()
4496 Me._commandCollection
= New Global.System
.Data
.SqlClient
.SqlCommand(0) {}
4497 Me._commandCollection(0) = New Global.System
.Data
.SqlClient
.SqlCommand
4498 Me._commandCollection(0).Connection
= Me.Connection
4499 Me._commandCollection(0).CommandText
= "SELECT CourseID, PersonID FROM dbo.CourseInstructor"
4500 Me._commandCollection(0).CommandType
= Global.System
.Data
.CommandType
.Text
4503 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
4504 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter"), _
4505 Global.System
.ComponentModel
.DataObjectMethodAttribute(Global.System
.ComponentModel
.DataObjectMethodType
.Fill
, true)> _
4506 Public Overloads Overridable
Function Fill(ByVal dataTable
As SQLServer2005DBDataSet
.CourseInstructorDataTable
) As Integer
4507 Me.Adapter
.SelectCommand
= Me.CommandCollection(0)
4508 If (Me.ClearBeforeFill
= true) Then
4511 Dim returnValue
As Integer = Me.Adapter
.Fill(dataTable
)
4515 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
4516 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter"), _
4517 Global.System
.ComponentModel
.DataObjectMethodAttribute(Global.System
.ComponentModel
.DataObjectMethodType
.[Select], true)> _
4518 Public Overloads Overridable
Function GetData() As SQLServer2005DBDataSet
.CourseInstructorDataTable
4519 Me.Adapter
.SelectCommand
= Me.CommandCollection(0)
4520 Dim dataTable
As SQLServer2005DBDataSet
.CourseInstructorDataTable
= New SQLServer2005DBDataSet
.CourseInstructorDataTable
4521 Me.Adapter
.Fill(dataTable
)
4525 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
4526 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter")> _
4527 Public Overloads Overridable
Function Update(ByVal dataTable
As SQLServer2005DBDataSet
.CourseInstructorDataTable
) As Integer
4528 Return Me.Adapter
.Update(dataTable
)
4531 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
4532 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter")> _
4533 Public Overloads Overridable
Function Update(ByVal dataSet
As SQLServer2005DBDataSet
) As Integer
4534 Return Me.Adapter
.Update(dataSet
, "CourseInstructor")
4537 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
4538 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter")> _
4539 Public Overloads Overridable
Function Update(ByVal dataRow
As Global.System
.Data
.DataRow
) As Integer
4540 Return Me.Adapter
.Update(New Global.System
.Data
.DataRow() {dataRow
})
4543 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
4544 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter")> _
4545 Public Overloads Overridable
Function Update(ByVal dataRows() As Global.System
.Data
.DataRow
) As Integer
4546 Return Me.Adapter
.Update(dataRows
)
4549 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
4550 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter"), _
4551 Global.System
.ComponentModel
.DataObjectMethodAttribute(Global.System
.ComponentModel
.DataObjectMethodType
.Delete
, true)> _
4552 Public Overloads Overridable
Function Delete(ByVal Original_CourseID
As Integer, ByVal Original_PersonID
As Integer) As Integer
4553 Me.Adapter
.DeleteCommand
.Parameters(0).Value
= CType(Original_CourseID
,Integer)
4554 Me.Adapter
.DeleteCommand
.Parameters(1).Value
= CType(Original_PersonID
,Integer)
4555 Dim previousConnectionState
As Global.System
.Data
.ConnectionState
= Me.Adapter
.DeleteCommand
.Connection
.State
4556 If ((Me.Adapter
.DeleteCommand
.Connection
.State
And Global.System
.Data
.ConnectionState
.Open
) _
4557 <> Global.System
.Data
.ConnectionState
.Open
) Then
4558 Me.Adapter
.DeleteCommand
.Connection
.Open
4561 Dim returnValue
As Integer = Me.Adapter
.DeleteCommand
.ExecuteNonQuery
4564 If (previousConnectionState
= Global.System
.Data
.ConnectionState
.Closed
) Then
4565 Me.Adapter
.DeleteCommand
.Connection
.Close
4570 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
4571 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter"), _
4572 Global.System
.ComponentModel
.DataObjectMethodAttribute(Global.System
.ComponentModel
.DataObjectMethodType
.Insert
, true)> _
4573 Public Overloads Overridable
Function Insert(ByVal CourseID
As Integer, ByVal PersonID
As Integer) As Integer
4574 Me.Adapter
.InsertCommand
.Parameters(0).Value
= CType(CourseID
,Integer)
4575 Me.Adapter
.InsertCommand
.Parameters(1).Value
= CType(PersonID
,Integer)
4576 Dim previousConnectionState
As Global.System
.Data
.ConnectionState
= Me.Adapter
.InsertCommand
.Connection
.State
4577 If ((Me.Adapter
.InsertCommand
.Connection
.State
And Global.System
.Data
.ConnectionState
.Open
) _
4578 <> Global.System
.Data
.ConnectionState
.Open
) Then
4579 Me.Adapter
.InsertCommand
.Connection
.Open
4582 Dim returnValue
As Integer = Me.Adapter
.InsertCommand
.ExecuteNonQuery
4585 If (previousConnectionState
= Global.System
.Data
.ConnectionState
.Closed
) Then
4586 Me.Adapter
.InsertCommand
.Connection
.Close
4591 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
4592 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter"), _
4593 Global.System
.ComponentModel
.DataObjectMethodAttribute(Global.System
.ComponentModel
.DataObjectMethodType
.Update
, true)> _
4594 Public Overloads Overridable
Function Update(ByVal CourseID
As Integer, ByVal PersonID
As Integer, ByVal Original_CourseID
As Integer, ByVal Original_PersonID
As Integer) As Integer
4595 Me.Adapter
.UpdateCommand
.Parameters(0).Value
= CType(CourseID
,Integer)
4596 Me.Adapter
.UpdateCommand
.Parameters(1).Value
= CType(PersonID
,Integer)
4597 Me.Adapter
.UpdateCommand
.Parameters(2).Value
= CType(Original_CourseID
,Integer)
4598 Me.Adapter
.UpdateCommand
.Parameters(3).Value
= CType(Original_PersonID
,Integer)
4599 Dim previousConnectionState
As Global.System
.Data
.ConnectionState
= Me.Adapter
.UpdateCommand
.Connection
.State
4600 If ((Me.Adapter
.UpdateCommand
.Connection
.State
And Global.System
.Data
.ConnectionState
.Open
) _
4601 <> Global.System
.Data
.ConnectionState
.Open
) Then
4602 Me.Adapter
.UpdateCommand
.Connection
.Open
4605 Dim returnValue
As Integer = Me.Adapter
.UpdateCommand
.ExecuteNonQuery
4608 If (previousConnectionState
= Global.System
.Data
.ConnectionState
.Closed
) Then
4609 Me.Adapter
.UpdateCommand
.Connection
.Close
4614 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
4615 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter"), _
4616 Global.System
.ComponentModel
.DataObjectMethodAttribute(Global.System
.ComponentModel
.DataObjectMethodType
.Update
, true)> _
4617 Public Overloads Overridable
Function Update(ByVal Original_CourseID
As Integer, ByVal Original_PersonID
As Integer) As Integer
4618 Return Me.Update(Original_CourseID
, Original_PersonID
, Original_CourseID
, Original_PersonID
)
4623 '''Represents the connection and commands used to retrieve and save data.
4625 <Global.System
.CodeDom
.Compiler
.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
4626 Global.System
.ComponentModel
.DesignerCategoryAttribute("code"), _
4627 Global.System
.ComponentModel
.ToolboxItem(true), _
4628 Global.System
.ComponentModel
.DataObjectAttribute(true), _
4629 Global.System
.ComponentModel
.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
4630 ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
4631 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter")> _
4632 Partial
Public Class DepartmentTableAdapter
4633 Inherits
Global.System
.ComponentModel
.Component
4635 Private WithEvents _adapter
As Global.System
.Data
.SqlClient
.SqlDataAdapter
4637 Private _connection
As Global.System
.Data
.SqlClient
.SqlConnection
4639 Private _transaction
As Global.System
.Data
.SqlClient
.SqlTransaction
4641 Private _commandCollection() As Global.System
.Data
.SqlClient
.SqlCommand
4643 Private _clearBeforeFill
As Boolean
4645 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
4648 Me.ClearBeforeFill
= true
4651 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
4652 Protected
Friend ReadOnly
Property Adapter() As Global.System
.Data
.SqlClient
.SqlDataAdapter
4654 If (Me._adapter Is
Nothing) Then
4661 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
4662 Friend Property Connection() As Global.System
.Data
.SqlClient
.SqlConnection
4664 If (Me._connection Is
Nothing) Then
4667 Return Me._connection
4670 Me._connection
= value
4671 If (Not (Me.Adapter
.InsertCommand
) Is
Nothing) Then
4672 Me.Adapter
.InsertCommand
.Connection
= value
4674 If (Not (Me.Adapter
.DeleteCommand
) Is
Nothing) Then
4675 Me.Adapter
.DeleteCommand
.Connection
= value
4677 If (Not (Me.Adapter
.UpdateCommand
) Is
Nothing) Then
4678 Me.Adapter
.UpdateCommand
.Connection
= value
4680 Dim i
As Integer = 0
4681 Do While (i
< Me.CommandCollection
.Length
)
4682 If (Not (Me.CommandCollection(i
)) Is
Nothing) Then
4683 CType(Me.CommandCollection(i
),Global.System
.Data
.SqlClient
.SqlCommand
).Connection
= value
4690 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
4691 Friend Property Transaction() As Global.System
.Data
.SqlClient
.SqlTransaction
4693 Return Me._transaction
4696 Me._transaction
= value
4697 Dim i
As Integer = 0
4698 Do While (i
< Me.CommandCollection
.Length
)
4699 Me.CommandCollection(i
).Transaction
= Me._transaction
4702 If ((Not (Me.Adapter
) Is
Nothing) _
4703 AndAlso (Not (Me.Adapter
.DeleteCommand
) Is
Nothing)) Then
4704 Me.Adapter
.DeleteCommand
.Transaction
= Me._transaction
4706 If ((Not (Me.Adapter
) Is
Nothing) _
4707 AndAlso (Not (Me.Adapter
.InsertCommand
) Is
Nothing)) Then
4708 Me.Adapter
.InsertCommand
.Transaction
= Me._transaction
4710 If ((Not (Me.Adapter
) Is
Nothing) _
4711 AndAlso (Not (Me.Adapter
.UpdateCommand
) Is
Nothing)) Then
4712 Me.Adapter
.UpdateCommand
.Transaction
= Me._transaction
4717 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
4718 Protected ReadOnly
Property CommandCollection() As Global.System
.Data
.SqlClient
.SqlCommand()
4720 If (Me._commandCollection Is
Nothing) Then
4721 Me.InitCommandCollection
4723 Return Me._commandCollection
4727 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
4728 Public Property ClearBeforeFill() As Boolean
4730 Return Me._clearBeforeFill
4733 Me._clearBeforeFill
= value
4737 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
4738 Private Sub InitAdapter()
4739 Me._adapter
= New Global.System
.Data
.SqlClient
.SqlDataAdapter
4740 Dim tableMapping
As Global.System
.Data
.Common
.DataTableMapping
= New Global.System
.Data
.Common
.DataTableMapping
4741 tableMapping
.SourceTable
= "Table"
4742 tableMapping
.DataSetTable
= "Department"
4743 tableMapping
.ColumnMappings
.Add("DepartmentID", "DepartmentID")
4744 tableMapping
.ColumnMappings
.Add("Name", "Name")
4745 tableMapping
.ColumnMappings
.Add("Budget", "Budget")
4746 tableMapping
.ColumnMappings
.Add("StartDate", "StartDate")
4747 tableMapping
.ColumnMappings
.Add("Administrator", "Administrator")
4748 Me._adapter
.TableMappings
.Add(tableMapping
)
4749 Me._adapter
.DeleteCommand
= New Global.System
.Data
.SqlClient
.SqlCommand
4750 Me._adapter
.DeleteCommand
.Connection
= Me.Connection
4751 Me._adapter
.DeleteCommand
.CommandText
= "DELETE FROM [dbo].[Department] WHERE (([DepartmentID] = @Original_DepartmentID) A"& _
4752 "ND ([Name] = @Original_Name) AND ([Budget] = @Original_Budget) AND ([StartDate] "& _
4753 "= @Original_StartDate) AND ((@IsNull_Administrator = 1 AND [Administrator] IS NU"& _
4754 "LL) OR ([Administrator] = @Original_Administrator)))"
4755 Me._adapter
.DeleteCommand
.CommandType
= Global.System
.Data
.CommandType
.Text
4756 Me._adapter
.DeleteCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_DepartmentID", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "DepartmentID", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
4757 Me._adapter
.DeleteCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_Name", Global.System
.Data
.SqlDbType
.NVarChar
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "Name", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
4758 Me._adapter
.DeleteCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_Budget", Global.System
.Data
.SqlDbType
.Money
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "Budget", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
4759 Me._adapter
.DeleteCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_StartDate", Global.System
.Data
.SqlDbType
.DateTime
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "StartDate", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
4760 Me._adapter
.DeleteCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@IsNull_Administrator", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "Administrator", Global.System
.Data
.DataRowVersion
.Original
, true, Nothing, "", "", ""))
4761 Me._adapter
.DeleteCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_Administrator", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "Administrator", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
4762 Me._adapter
.InsertCommand
= New Global.System
.Data
.SqlClient
.SqlCommand
4763 Me._adapter
.InsertCommand
.Connection
= Me.Connection
4764 Me._adapter
.InsertCommand
.CommandText
= "INSERT INTO [dbo].[Department] ([DepartmentID], [Name], [Budget], [StartDate], [A"& _
4765 "dministrator]) VALUES (@DepartmentID, @Name, @Budget, @StartDate, @Administrator"& _
4766 ");"&Global.Microsoft
.VisualBasic
.ChrW(13)&Global.Microsoft
.VisualBasic
.ChrW(10)&"SELECT DepartmentID, Name, Budget, StartDate, Administrator FROM Department "& _
4767 "WHERE (DepartmentID = @DepartmentID)"
4768 Me._adapter
.InsertCommand
.CommandType
= Global.System
.Data
.CommandType
.Text
4769 Me._adapter
.InsertCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@DepartmentID", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "DepartmentID", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
4770 Me._adapter
.InsertCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Name", Global.System
.Data
.SqlDbType
.NVarChar
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "Name", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
4771 Me._adapter
.InsertCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Budget", Global.System
.Data
.SqlDbType
.Money
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "Budget", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
4772 Me._adapter
.InsertCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@StartDate", Global.System
.Data
.SqlDbType
.DateTime
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "StartDate", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
4773 Me._adapter
.InsertCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Administrator", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "Administrator", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
4774 Me._adapter
.UpdateCommand
= New Global.System
.Data
.SqlClient
.SqlCommand
4775 Me._adapter
.UpdateCommand
.Connection
= Me.Connection
4776 Me._adapter
.UpdateCommand
.CommandText
= "UPDATE [dbo].[Department] SET [DepartmentID] = @DepartmentID, [Name] = @Name, [Bu"& _
4777 "dget] = @Budget, [StartDate] = @StartDate, [Administrator] = @Administrator WHER"& _
4778 "E (([DepartmentID] = @Original_DepartmentID) AND ([Name] = @Original_Name) AND ("& _
4779 "[Budget] = @Original_Budget) AND ([StartDate] = @Original_StartDate) AND ((@IsNu"& _
4780 "ll_Administrator = 1 AND [Administrator] IS NULL) OR ([Administrator] = @Origina"& _
4781 "l_Administrator)));"&Global.Microsoft
.VisualBasic
.ChrW(13)&Global.Microsoft
.VisualBasic
.ChrW(10)&"SELECT DepartmentID, Name, Budget, StartDate, Administrator"& _
4782 " FROM Department WHERE (DepartmentID = @DepartmentID)"
4783 Me._adapter
.UpdateCommand
.CommandType
= Global.System
.Data
.CommandType
.Text
4784 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@DepartmentID", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "DepartmentID", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
4785 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Name", Global.System
.Data
.SqlDbType
.NVarChar
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "Name", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
4786 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Budget", Global.System
.Data
.SqlDbType
.Money
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "Budget", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
4787 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@StartDate", Global.System
.Data
.SqlDbType
.DateTime
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "StartDate", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
4788 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Administrator", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "Administrator", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
4789 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_DepartmentID", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "DepartmentID", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
4790 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_Name", Global.System
.Data
.SqlDbType
.NVarChar
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "Name", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
4791 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_Budget", Global.System
.Data
.SqlDbType
.Money
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "Budget", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
4792 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_StartDate", Global.System
.Data
.SqlDbType
.DateTime
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "StartDate", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
4793 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@IsNull_Administrator", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "Administrator", Global.System
.Data
.DataRowVersion
.Original
, true, Nothing, "", "", ""))
4794 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_Administrator", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "Administrator", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
4797 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
4798 Private Sub InitConnection()
4799 Me._connection
= New Global.System
.Data
.SqlClient
.SqlConnection
4800 Me._connection
.ConnectionString
= Global.VBUseADONET
.My
.MySettings
.Default
.SQLServer2005DBConnectionString
4803 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
4804 Private Sub InitCommandCollection()
4805 Me._commandCollection
= New Global.System
.Data
.SqlClient
.SqlCommand(0) {}
4806 Me._commandCollection(0) = New Global.System
.Data
.SqlClient
.SqlCommand
4807 Me._commandCollection(0).Connection
= Me.Connection
4808 Me._commandCollection(0).CommandText
= "SELECT DepartmentID, Name, Budget, StartDate, Administrator FROM dbo.Department"
4809 Me._commandCollection(0).CommandType
= Global.System
.Data
.CommandType
.Text
4812 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
4813 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter"), _
4814 Global.System
.ComponentModel
.DataObjectMethodAttribute(Global.System
.ComponentModel
.DataObjectMethodType
.Fill
, true)> _
4815 Public Overloads Overridable
Function Fill(ByVal dataTable
As SQLServer2005DBDataSet
.DepartmentDataTable
) As Integer
4816 Me.Adapter
.SelectCommand
= Me.CommandCollection(0)
4817 If (Me.ClearBeforeFill
= true) Then
4820 Dim returnValue
As Integer = Me.Adapter
.Fill(dataTable
)
4824 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
4825 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter"), _
4826 Global.System
.ComponentModel
.DataObjectMethodAttribute(Global.System
.ComponentModel
.DataObjectMethodType
.[Select], true)> _
4827 Public Overloads Overridable
Function GetData() As SQLServer2005DBDataSet
.DepartmentDataTable
4828 Me.Adapter
.SelectCommand
= Me.CommandCollection(0)
4829 Dim dataTable
As SQLServer2005DBDataSet
.DepartmentDataTable
= New SQLServer2005DBDataSet
.DepartmentDataTable
4830 Me.Adapter
.Fill(dataTable
)
4834 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
4835 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter")> _
4836 Public Overloads Overridable
Function Update(ByVal dataTable
As SQLServer2005DBDataSet
.DepartmentDataTable
) As Integer
4837 Return Me.Adapter
.Update(dataTable
)
4840 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
4841 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter")> _
4842 Public Overloads Overridable
Function Update(ByVal dataSet
As SQLServer2005DBDataSet
) As Integer
4843 Return Me.Adapter
.Update(dataSet
, "Department")
4846 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
4847 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter")> _
4848 Public Overloads Overridable
Function Update(ByVal dataRow
As Global.System
.Data
.DataRow
) As Integer
4849 Return Me.Adapter
.Update(New Global.System
.Data
.DataRow() {dataRow
})
4852 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
4853 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter")> _
4854 Public Overloads Overridable
Function Update(ByVal dataRows() As Global.System
.Data
.DataRow
) As Integer
4855 Return Me.Adapter
.Update(dataRows
)
4858 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
4859 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter"), _
4860 Global.System
.ComponentModel
.DataObjectMethodAttribute(Global.System
.ComponentModel
.DataObjectMethodType
.Delete
, true)> _
4861 Public Overloads Overridable
Function Delete(ByVal Original_DepartmentID
As Integer, ByVal Original_Name
As String, ByVal Original_Budget
As Decimal, ByVal Original_StartDate
As Date, ByVal Original_Administrator
As Global.System
.Nullable(Of
Integer)) As Integer
4862 Me.Adapter
.DeleteCommand
.Parameters(0).Value
= CType(Original_DepartmentID
,Integer)
4863 If (Original_Name Is
Nothing) Then
4864 Throw
New Global.System
.ArgumentNullException("Original_Name")
4866 Me.Adapter
.DeleteCommand
.Parameters(1).Value
= CType(Original_Name
,String)
4868 Me.Adapter
.DeleteCommand
.Parameters(2).Value
= CType(Original_Budget
,Decimal)
4869 Me.Adapter
.DeleteCommand
.Parameters(3).Value
= CType(Original_StartDate
,Date)
4870 If (Original_Administrator
.HasValue
= true) Then
4871 Me.Adapter
.DeleteCommand
.Parameters(4).Value
= CType(0,Object)
4872 Me.Adapter
.DeleteCommand
.Parameters(5).Value
= CType(Original_Administrator
.Value
,Integer)
4874 Me.Adapter
.DeleteCommand
.Parameters(4).Value
= CType(1,Object)
4875 Me.Adapter
.DeleteCommand
.Parameters(5).Value
= Global.System
.DBNull
.Value
4877 Dim previousConnectionState
As Global.System
.Data
.ConnectionState
= Me.Adapter
.DeleteCommand
.Connection
.State
4878 If ((Me.Adapter
.DeleteCommand
.Connection
.State
And Global.System
.Data
.ConnectionState
.Open
) _
4879 <> Global.System
.Data
.ConnectionState
.Open
) Then
4880 Me.Adapter
.DeleteCommand
.Connection
.Open
4883 Dim returnValue
As Integer = Me.Adapter
.DeleteCommand
.ExecuteNonQuery
4886 If (previousConnectionState
= Global.System
.Data
.ConnectionState
.Closed
) Then
4887 Me.Adapter
.DeleteCommand
.Connection
.Close
4892 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
4893 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter"), _
4894 Global.System
.ComponentModel
.DataObjectMethodAttribute(Global.System
.ComponentModel
.DataObjectMethodType
.Insert
, true)> _
4895 Public Overloads Overridable
Function Insert(ByVal DepartmentID
As Integer, ByVal Name
As String, ByVal Budget
As Decimal, ByVal StartDate
As Date, ByVal Administrator
As Global.System
.Nullable(Of
Integer)) As Integer
4896 Me.Adapter
.InsertCommand
.Parameters(0).Value
= CType(DepartmentID
,Integer)
4897 If (Name Is
Nothing) Then
4898 Throw
New Global.System
.ArgumentNullException("Name")
4900 Me.Adapter
.InsertCommand
.Parameters(1).Value
= CType(Name
,String)
4902 Me.Adapter
.InsertCommand
.Parameters(2).Value
= CType(Budget
,Decimal)
4903 Me.Adapter
.InsertCommand
.Parameters(3).Value
= CType(StartDate
,Date)
4904 If (Administrator
.HasValue
= true) Then
4905 Me.Adapter
.InsertCommand
.Parameters(4).Value
= CType(Administrator
.Value
,Integer)
4907 Me.Adapter
.InsertCommand
.Parameters(4).Value
= Global.System
.DBNull
.Value
4909 Dim previousConnectionState
As Global.System
.Data
.ConnectionState
= Me.Adapter
.InsertCommand
.Connection
.State
4910 If ((Me.Adapter
.InsertCommand
.Connection
.State
And Global.System
.Data
.ConnectionState
.Open
) _
4911 <> Global.System
.Data
.ConnectionState
.Open
) Then
4912 Me.Adapter
.InsertCommand
.Connection
.Open
4915 Dim returnValue
As Integer = Me.Adapter
.InsertCommand
.ExecuteNonQuery
4918 If (previousConnectionState
= Global.System
.Data
.ConnectionState
.Closed
) Then
4919 Me.Adapter
.InsertCommand
.Connection
.Close
4924 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
4925 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter"), _
4926 Global.System
.ComponentModel
.DataObjectMethodAttribute(Global.System
.ComponentModel
.DataObjectMethodType
.Update
, true)> _
4927 Public Overloads Overridable
Function Update(ByVal DepartmentID
As Integer, ByVal Name
As String, ByVal Budget
As Decimal, ByVal StartDate
As Date, ByVal Administrator
As Global.System
.Nullable(Of
Integer), ByVal Original_DepartmentID
As Integer, ByVal Original_Name
As String, ByVal Original_Budget
As Decimal, ByVal Original_StartDate
As Date, ByVal Original_Administrator
As Global.System
.Nullable(Of
Integer)) As Integer
4928 Me.Adapter
.UpdateCommand
.Parameters(0).Value
= CType(DepartmentID
,Integer)
4929 If (Name Is
Nothing) Then
4930 Throw
New Global.System
.ArgumentNullException("Name")
4932 Me.Adapter
.UpdateCommand
.Parameters(1).Value
= CType(Name
,String)
4934 Me.Adapter
.UpdateCommand
.Parameters(2).Value
= CType(Budget
,Decimal)
4935 Me.Adapter
.UpdateCommand
.Parameters(3).Value
= CType(StartDate
,Date)
4936 If (Administrator
.HasValue
= true) Then
4937 Me.Adapter
.UpdateCommand
.Parameters(4).Value
= CType(Administrator
.Value
,Integer)
4939 Me.Adapter
.UpdateCommand
.Parameters(4).Value
= Global.System
.DBNull
.Value
4941 Me.Adapter
.UpdateCommand
.Parameters(5).Value
= CType(Original_DepartmentID
,Integer)
4942 If (Original_Name Is
Nothing) Then
4943 Throw
New Global.System
.ArgumentNullException("Original_Name")
4945 Me.Adapter
.UpdateCommand
.Parameters(6).Value
= CType(Original_Name
,String)
4947 Me.Adapter
.UpdateCommand
.Parameters(7).Value
= CType(Original_Budget
,Decimal)
4948 Me.Adapter
.UpdateCommand
.Parameters(8).Value
= CType(Original_StartDate
,Date)
4949 If (Original_Administrator
.HasValue
= true) Then
4950 Me.Adapter
.UpdateCommand
.Parameters(9).Value
= CType(0,Object)
4951 Me.Adapter
.UpdateCommand
.Parameters(10).Value
= CType(Original_Administrator
.Value
,Integer)
4953 Me.Adapter
.UpdateCommand
.Parameters(9).Value
= CType(1,Object)
4954 Me.Adapter
.UpdateCommand
.Parameters(10).Value
= Global.System
.DBNull
.Value
4956 Dim previousConnectionState
As Global.System
.Data
.ConnectionState
= Me.Adapter
.UpdateCommand
.Connection
.State
4957 If ((Me.Adapter
.UpdateCommand
.Connection
.State
And Global.System
.Data
.ConnectionState
.Open
) _
4958 <> Global.System
.Data
.ConnectionState
.Open
) Then
4959 Me.Adapter
.UpdateCommand
.Connection
.Open
4962 Dim returnValue
As Integer = Me.Adapter
.UpdateCommand
.ExecuteNonQuery
4965 If (previousConnectionState
= Global.System
.Data
.ConnectionState
.Closed
) Then
4966 Me.Adapter
.UpdateCommand
.Connection
.Close
4971 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
4972 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter"), _
4973 Global.System
.ComponentModel
.DataObjectMethodAttribute(Global.System
.ComponentModel
.DataObjectMethodType
.Update
, true)> _
4974 Public Overloads Overridable
Function Update(ByVal Name
As String, ByVal Budget
As Decimal, ByVal StartDate
As Date, ByVal Administrator
As Global.System
.Nullable(Of
Integer), ByVal Original_DepartmentID
As Integer, ByVal Original_Name
As String, ByVal Original_Budget
As Decimal, ByVal Original_StartDate
As Date, ByVal Original_Administrator
As Global.System
.Nullable(Of
Integer)) As Integer
4975 Return Me.Update(Original_DepartmentID
, Name
, Budget
, StartDate
, Administrator
, Original_DepartmentID
, Original_Name
, Original_Budget
, Original_StartDate
, Original_Administrator
)
4980 '''Represents the connection and commands used to retrieve and save data.
4982 <Global.System
.CodeDom
.Compiler
.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
4983 Global.System
.ComponentModel
.DesignerCategoryAttribute("code"), _
4984 Global.System
.ComponentModel
.ToolboxItem(true), _
4985 Global.System
.ComponentModel
.DataObjectAttribute(true), _
4986 Global.System
.ComponentModel
.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
4987 ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
4988 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter")> _
4989 Partial
Public Class OfficeAssignmentTableAdapter
4990 Inherits
Global.System
.ComponentModel
.Component
4992 Private WithEvents _adapter
As Global.System
.Data
.SqlClient
.SqlDataAdapter
4994 Private _connection
As Global.System
.Data
.SqlClient
.SqlConnection
4996 Private _transaction
As Global.System
.Data
.SqlClient
.SqlTransaction
4998 Private _commandCollection() As Global.System
.Data
.SqlClient
.SqlCommand
5000 Private _clearBeforeFill
As Boolean
5002 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
5005 Me.ClearBeforeFill
= true
5008 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
5009 Protected
Friend ReadOnly
Property Adapter() As Global.System
.Data
.SqlClient
.SqlDataAdapter
5011 If (Me._adapter Is
Nothing) Then
5018 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
5019 Friend Property Connection() As Global.System
.Data
.SqlClient
.SqlConnection
5021 If (Me._connection Is
Nothing) Then
5024 Return Me._connection
5027 Me._connection
= value
5028 If (Not (Me.Adapter
.InsertCommand
) Is
Nothing) Then
5029 Me.Adapter
.InsertCommand
.Connection
= value
5031 If (Not (Me.Adapter
.DeleteCommand
) Is
Nothing) Then
5032 Me.Adapter
.DeleteCommand
.Connection
= value
5034 If (Not (Me.Adapter
.UpdateCommand
) Is
Nothing) Then
5035 Me.Adapter
.UpdateCommand
.Connection
= value
5037 Dim i
As Integer = 0
5038 Do While (i
< Me.CommandCollection
.Length
)
5039 If (Not (Me.CommandCollection(i
)) Is
Nothing) Then
5040 CType(Me.CommandCollection(i
),Global.System
.Data
.SqlClient
.SqlCommand
).Connection
= value
5047 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
5048 Friend Property Transaction() As Global.System
.Data
.SqlClient
.SqlTransaction
5050 Return Me._transaction
5053 Me._transaction
= value
5054 Dim i
As Integer = 0
5055 Do While (i
< Me.CommandCollection
.Length
)
5056 Me.CommandCollection(i
).Transaction
= Me._transaction
5059 If ((Not (Me.Adapter
) Is
Nothing) _
5060 AndAlso (Not (Me.Adapter
.DeleteCommand
) Is
Nothing)) Then
5061 Me.Adapter
.DeleteCommand
.Transaction
= Me._transaction
5063 If ((Not (Me.Adapter
) Is
Nothing) _
5064 AndAlso (Not (Me.Adapter
.InsertCommand
) Is
Nothing)) Then
5065 Me.Adapter
.InsertCommand
.Transaction
= Me._transaction
5067 If ((Not (Me.Adapter
) Is
Nothing) _
5068 AndAlso (Not (Me.Adapter
.UpdateCommand
) Is
Nothing)) Then
5069 Me.Adapter
.UpdateCommand
.Transaction
= Me._transaction
5074 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
5075 Protected ReadOnly
Property CommandCollection() As Global.System
.Data
.SqlClient
.SqlCommand()
5077 If (Me._commandCollection Is
Nothing) Then
5078 Me.InitCommandCollection
5080 Return Me._commandCollection
5084 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
5085 Public Property ClearBeforeFill() As Boolean
5087 Return Me._clearBeforeFill
5090 Me._clearBeforeFill
= value
5094 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
5095 Private Sub InitAdapter()
5096 Me._adapter
= New Global.System
.Data
.SqlClient
.SqlDataAdapter
5097 Dim tableMapping
As Global.System
.Data
.Common
.DataTableMapping
= New Global.System
.Data
.Common
.DataTableMapping
5098 tableMapping
.SourceTable
= "Table"
5099 tableMapping
.DataSetTable
= "OfficeAssignment"
5100 tableMapping
.ColumnMappings
.Add("InstructorID", "InstructorID")
5101 tableMapping
.ColumnMappings
.Add("Location", "Location")
5102 tableMapping
.ColumnMappings
.Add("Timestamp", "Timestamp")
5103 Me._adapter
.TableMappings
.Add(tableMapping
)
5104 Me._adapter
.DeleteCommand
= New Global.System
.Data
.SqlClient
.SqlCommand
5105 Me._adapter
.DeleteCommand
.Connection
= Me.Connection
5106 Me._adapter
.DeleteCommand
.CommandText
= "DELETE FROM [dbo].[OfficeAssignment] WHERE (([InstructorID] = @Original_Instructo"& _
5107 "rID) AND ([Timestamp] = @Original_Timestamp))"
5108 Me._adapter
.DeleteCommand
.CommandType
= Global.System
.Data
.CommandType
.Text
5109 Me._adapter
.DeleteCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_InstructorID", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "InstructorID", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
5110 Me._adapter
.DeleteCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_Timestamp", Global.System
.Data
.SqlDbType
.Timestamp
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "Timestamp", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
5111 Me._adapter
.InsertCommand
= New Global.System
.Data
.SqlClient
.SqlCommand
5112 Me._adapter
.InsertCommand
.Connection
= Me.Connection
5113 Me._adapter
.InsertCommand
.CommandText
= "INSERT INTO [dbo].[OfficeAssignment] ([InstructorID], [Location]) VALUES (@Instru"& _
5114 "ctorID, @Location);"&Global.Microsoft
.VisualBasic
.ChrW(13)&Global.Microsoft
.VisualBasic
.ChrW(10)&"SELECT InstructorID, Location, Timestamp FROM OfficeAssignm"& _
5115 "ent WHERE (InstructorID = @InstructorID)"
5116 Me._adapter
.InsertCommand
.CommandType
= Global.System
.Data
.CommandType
.Text
5117 Me._adapter
.InsertCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@InstructorID", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "InstructorID", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
5118 Me._adapter
.InsertCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Location", Global.System
.Data
.SqlDbType
.NVarChar
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "Location", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
5119 Me._adapter
.UpdateCommand
= New Global.System
.Data
.SqlClient
.SqlCommand
5120 Me._adapter
.UpdateCommand
.Connection
= Me.Connection
5121 Me._adapter
.UpdateCommand
.CommandText
= "UPDATE [dbo].[OfficeAssignment] SET [InstructorID] = @InstructorID, [Location] = "& _
5122 "@Location WHERE (([InstructorID] = @Original_InstructorID) AND ([Timestamp] = @O"& _
5123 "riginal_Timestamp));"&Global.Microsoft
.VisualBasic
.ChrW(13)&Global.Microsoft
.VisualBasic
.ChrW(10)&"SELECT InstructorID, Location, Timestamp FROM OfficeAssign"& _
5124 "ment WHERE (InstructorID = @InstructorID)"
5125 Me._adapter
.UpdateCommand
.CommandType
= Global.System
.Data
.CommandType
.Text
5126 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@InstructorID", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "InstructorID", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
5127 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Location", Global.System
.Data
.SqlDbType
.NVarChar
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "Location", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
5128 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_InstructorID", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "InstructorID", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
5129 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_Timestamp", Global.System
.Data
.SqlDbType
.Timestamp
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "Timestamp", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
5132 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
5133 Private Sub InitConnection()
5134 Me._connection
= New Global.System
.Data
.SqlClient
.SqlConnection
5135 Me._connection
.ConnectionString
= Global.VBUseADONET
.My
.MySettings
.Default
.SQLServer2005DBConnectionString
5138 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
5139 Private Sub InitCommandCollection()
5140 Me._commandCollection
= New Global.System
.Data
.SqlClient
.SqlCommand(0) {}
5141 Me._commandCollection(0) = New Global.System
.Data
.SqlClient
.SqlCommand
5142 Me._commandCollection(0).Connection
= Me.Connection
5143 Me._commandCollection(0).CommandText
= "SELECT InstructorID, Location, Timestamp FROM dbo.OfficeAssignment"
5144 Me._commandCollection(0).CommandType
= Global.System
.Data
.CommandType
.Text
5147 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
5148 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter"), _
5149 Global.System
.ComponentModel
.DataObjectMethodAttribute(Global.System
.ComponentModel
.DataObjectMethodType
.Fill
, true)> _
5150 Public Overloads Overridable
Function Fill(ByVal dataTable
As SQLServer2005DBDataSet
.OfficeAssignmentDataTable
) As Integer
5151 Me.Adapter
.SelectCommand
= Me.CommandCollection(0)
5152 If (Me.ClearBeforeFill
= true) Then
5155 Dim returnValue
As Integer = Me.Adapter
.Fill(dataTable
)
5159 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
5160 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter"), _
5161 Global.System
.ComponentModel
.DataObjectMethodAttribute(Global.System
.ComponentModel
.DataObjectMethodType
.[Select], true)> _
5162 Public Overloads Overridable
Function GetData() As SQLServer2005DBDataSet
.OfficeAssignmentDataTable
5163 Me.Adapter
.SelectCommand
= Me.CommandCollection(0)
5164 Dim dataTable
As SQLServer2005DBDataSet
.OfficeAssignmentDataTable
= New SQLServer2005DBDataSet
.OfficeAssignmentDataTable
5165 Me.Adapter
.Fill(dataTable
)
5169 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
5170 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter")> _
5171 Public Overloads Overridable
Function Update(ByVal dataTable
As SQLServer2005DBDataSet
.OfficeAssignmentDataTable
) As Integer
5172 Return Me.Adapter
.Update(dataTable
)
5175 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
5176 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter")> _
5177 Public Overloads Overridable
Function Update(ByVal dataSet
As SQLServer2005DBDataSet
) As Integer
5178 Return Me.Adapter
.Update(dataSet
, "OfficeAssignment")
5181 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
5182 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter")> _
5183 Public Overloads Overridable
Function Update(ByVal dataRow
As Global.System
.Data
.DataRow
) As Integer
5184 Return Me.Adapter
.Update(New Global.System
.Data
.DataRow() {dataRow
})
5187 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
5188 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter")> _
5189 Public Overloads Overridable
Function Update(ByVal dataRows() As Global.System
.Data
.DataRow
) As Integer
5190 Return Me.Adapter
.Update(dataRows
)
5193 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
5194 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter"), _
5195 Global.System
.ComponentModel
.DataObjectMethodAttribute(Global.System
.ComponentModel
.DataObjectMethodType
.Delete
, true)> _
5196 Public Overloads Overridable
Function Delete(ByVal Original_InstructorID
As Integer, ByVal Original_Timestamp() As Byte) As Integer
5197 Me.Adapter
.DeleteCommand
.Parameters(0).Value
= CType(Original_InstructorID
,Integer)
5198 If (Original_Timestamp Is
Nothing) Then
5199 Throw
New Global.System
.ArgumentNullException("Original_Timestamp")
5201 Me.Adapter
.DeleteCommand
.Parameters(1).Value
= CType(Original_Timestamp
,Byte())
5203 Dim previousConnectionState
As Global.System
.Data
.ConnectionState
= Me.Adapter
.DeleteCommand
.Connection
.State
5204 If ((Me.Adapter
.DeleteCommand
.Connection
.State
And Global.System
.Data
.ConnectionState
.Open
) _
5205 <> Global.System
.Data
.ConnectionState
.Open
) Then
5206 Me.Adapter
.DeleteCommand
.Connection
.Open
5209 Dim returnValue
As Integer = Me.Adapter
.DeleteCommand
.ExecuteNonQuery
5212 If (previousConnectionState
= Global.System
.Data
.ConnectionState
.Closed
) Then
5213 Me.Adapter
.DeleteCommand
.Connection
.Close
5218 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
5219 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter"), _
5220 Global.System
.ComponentModel
.DataObjectMethodAttribute(Global.System
.ComponentModel
.DataObjectMethodType
.Insert
, true)> _
5221 Public Overloads Overridable
Function Insert(ByVal InstructorID
As Integer, ByVal Location
As String) As Integer
5222 Me.Adapter
.InsertCommand
.Parameters(0).Value
= CType(InstructorID
,Integer)
5223 If (Location Is
Nothing) Then
5224 Throw
New Global.System
.ArgumentNullException("Location")
5226 Me.Adapter
.InsertCommand
.Parameters(1).Value
= CType(Location
,String)
5228 Dim previousConnectionState
As Global.System
.Data
.ConnectionState
= Me.Adapter
.InsertCommand
.Connection
.State
5229 If ((Me.Adapter
.InsertCommand
.Connection
.State
And Global.System
.Data
.ConnectionState
.Open
) _
5230 <> Global.System
.Data
.ConnectionState
.Open
) Then
5231 Me.Adapter
.InsertCommand
.Connection
.Open
5234 Dim returnValue
As Integer = Me.Adapter
.InsertCommand
.ExecuteNonQuery
5237 If (previousConnectionState
= Global.System
.Data
.ConnectionState
.Closed
) Then
5238 Me.Adapter
.InsertCommand
.Connection
.Close
5243 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
5244 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter"), _
5245 Global.System
.ComponentModel
.DataObjectMethodAttribute(Global.System
.ComponentModel
.DataObjectMethodType
.Update
, true)> _
5246 Public Overloads Overridable
Function Update(ByVal InstructorID
As Integer, ByVal Location
As String, ByVal Original_InstructorID
As Integer, ByVal Original_Timestamp() As Byte) As Integer
5247 Me.Adapter
.UpdateCommand
.Parameters(0).Value
= CType(InstructorID
,Integer)
5248 If (Location Is
Nothing) Then
5249 Throw
New Global.System
.ArgumentNullException("Location")
5251 Me.Adapter
.UpdateCommand
.Parameters(1).Value
= CType(Location
,String)
5253 Me.Adapter
.UpdateCommand
.Parameters(2).Value
= CType(Original_InstructorID
,Integer)
5254 If (Original_Timestamp Is
Nothing) Then
5255 Throw
New Global.System
.ArgumentNullException("Original_Timestamp")
5257 Me.Adapter
.UpdateCommand
.Parameters(3).Value
= CType(Original_Timestamp
,Byte())
5259 Dim previousConnectionState
As Global.System
.Data
.ConnectionState
= Me.Adapter
.UpdateCommand
.Connection
.State
5260 If ((Me.Adapter
.UpdateCommand
.Connection
.State
And Global.System
.Data
.ConnectionState
.Open
) _
5261 <> Global.System
.Data
.ConnectionState
.Open
) Then
5262 Me.Adapter
.UpdateCommand
.Connection
.Open
5265 Dim returnValue
As Integer = Me.Adapter
.UpdateCommand
.ExecuteNonQuery
5268 If (previousConnectionState
= Global.System
.Data
.ConnectionState
.Closed
) Then
5269 Me.Adapter
.UpdateCommand
.Connection
.Close
5274 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
5275 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter"), _
5276 Global.System
.ComponentModel
.DataObjectMethodAttribute(Global.System
.ComponentModel
.DataObjectMethodType
.Update
, true)> _
5277 Public Overloads Overridable
Function Update(ByVal Location
As String, ByVal Original_InstructorID
As Integer, ByVal Original_Timestamp() As Byte) As Integer
5278 Return Me.Update(Original_InstructorID
, Location
, Original_InstructorID
, Original_Timestamp
)
5283 '''Represents the connection and commands used to retrieve and save data.
5285 <Global.System
.CodeDom
.Compiler
.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
5286 Global.System
.ComponentModel
.DesignerCategoryAttribute("code"), _
5287 Global.System
.ComponentModel
.ToolboxItem(true), _
5288 Global.System
.ComponentModel
.DataObjectAttribute(true), _
5289 Global.System
.ComponentModel
.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
5290 ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
5291 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter")> _
5292 Partial
Public Class OnlineCourseTableAdapter
5293 Inherits
Global.System
.ComponentModel
.Component
5295 Private WithEvents _adapter
As Global.System
.Data
.SqlClient
.SqlDataAdapter
5297 Private _connection
As Global.System
.Data
.SqlClient
.SqlConnection
5299 Private _transaction
As Global.System
.Data
.SqlClient
.SqlTransaction
5301 Private _commandCollection() As Global.System
.Data
.SqlClient
.SqlCommand
5303 Private _clearBeforeFill
As Boolean
5305 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
5308 Me.ClearBeforeFill
= true
5311 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
5312 Protected
Friend ReadOnly
Property Adapter() As Global.System
.Data
.SqlClient
.SqlDataAdapter
5314 If (Me._adapter Is
Nothing) Then
5321 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
5322 Friend Property Connection() As Global.System
.Data
.SqlClient
.SqlConnection
5324 If (Me._connection Is
Nothing) Then
5327 Return Me._connection
5330 Me._connection
= value
5331 If (Not (Me.Adapter
.InsertCommand
) Is
Nothing) Then
5332 Me.Adapter
.InsertCommand
.Connection
= value
5334 If (Not (Me.Adapter
.DeleteCommand
) Is
Nothing) Then
5335 Me.Adapter
.DeleteCommand
.Connection
= value
5337 If (Not (Me.Adapter
.UpdateCommand
) Is
Nothing) Then
5338 Me.Adapter
.UpdateCommand
.Connection
= value
5340 Dim i
As Integer = 0
5341 Do While (i
< Me.CommandCollection
.Length
)
5342 If (Not (Me.CommandCollection(i
)) Is
Nothing) Then
5343 CType(Me.CommandCollection(i
),Global.System
.Data
.SqlClient
.SqlCommand
).Connection
= value
5350 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
5351 Friend Property Transaction() As Global.System
.Data
.SqlClient
.SqlTransaction
5353 Return Me._transaction
5356 Me._transaction
= value
5357 Dim i
As Integer = 0
5358 Do While (i
< Me.CommandCollection
.Length
)
5359 Me.CommandCollection(i
).Transaction
= Me._transaction
5362 If ((Not (Me.Adapter
) Is
Nothing) _
5363 AndAlso (Not (Me.Adapter
.DeleteCommand
) Is
Nothing)) Then
5364 Me.Adapter
.DeleteCommand
.Transaction
= Me._transaction
5366 If ((Not (Me.Adapter
) Is
Nothing) _
5367 AndAlso (Not (Me.Adapter
.InsertCommand
) Is
Nothing)) Then
5368 Me.Adapter
.InsertCommand
.Transaction
= Me._transaction
5370 If ((Not (Me.Adapter
) Is
Nothing) _
5371 AndAlso (Not (Me.Adapter
.UpdateCommand
) Is
Nothing)) Then
5372 Me.Adapter
.UpdateCommand
.Transaction
= Me._transaction
5377 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
5378 Protected ReadOnly
Property CommandCollection() As Global.System
.Data
.SqlClient
.SqlCommand()
5380 If (Me._commandCollection Is
Nothing) Then
5381 Me.InitCommandCollection
5383 Return Me._commandCollection
5387 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
5388 Public Property ClearBeforeFill() As Boolean
5390 Return Me._clearBeforeFill
5393 Me._clearBeforeFill
= value
5397 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
5398 Private Sub InitAdapter()
5399 Me._adapter
= New Global.System
.Data
.SqlClient
.SqlDataAdapter
5400 Dim tableMapping
As Global.System
.Data
.Common
.DataTableMapping
= New Global.System
.Data
.Common
.DataTableMapping
5401 tableMapping
.SourceTable
= "Table"
5402 tableMapping
.DataSetTable
= "OnlineCourse"
5403 tableMapping
.ColumnMappings
.Add("CourseID", "CourseID")
5404 tableMapping
.ColumnMappings
.Add("URL", "URL")
5405 Me._adapter
.TableMappings
.Add(tableMapping
)
5406 Me._adapter
.DeleteCommand
= New Global.System
.Data
.SqlClient
.SqlCommand
5407 Me._adapter
.DeleteCommand
.Connection
= Me.Connection
5408 Me._adapter
.DeleteCommand
.CommandText
= "DELETE FROM [dbo].[OnlineCourse] WHERE (([CourseID] = @Original_CourseID) AND ([U"& _
5409 "RL] = @Original_URL))"
5410 Me._adapter
.DeleteCommand
.CommandType
= Global.System
.Data
.CommandType
.Text
5411 Me._adapter
.DeleteCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_CourseID", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "CourseID", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
5412 Me._adapter
.DeleteCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_URL", Global.System
.Data
.SqlDbType
.NVarChar
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "URL", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
5413 Me._adapter
.InsertCommand
= New Global.System
.Data
.SqlClient
.SqlCommand
5414 Me._adapter
.InsertCommand
.Connection
= Me.Connection
5415 Me._adapter
.InsertCommand
.CommandText
= "INSERT INTO [dbo].[OnlineCourse] ([CourseID], [URL]) VALUES (@CourseID, @URL);"&Global.Microsoft
.VisualBasic
.ChrW(13)&Global.Microsoft
.VisualBasic
.ChrW(10)&"S"& _
5416 "ELECT CourseID, URL FROM OnlineCourse WHERE (CourseID = @CourseID)"
5417 Me._adapter
.InsertCommand
.CommandType
= Global.System
.Data
.CommandType
.Text
5418 Me._adapter
.InsertCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@CourseID", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "CourseID", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
5419 Me._adapter
.InsertCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@URL", Global.System
.Data
.SqlDbType
.NVarChar
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "URL", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
5420 Me._adapter
.UpdateCommand
= New Global.System
.Data
.SqlClient
.SqlCommand
5421 Me._adapter
.UpdateCommand
.Connection
= Me.Connection
5422 Me._adapter
.UpdateCommand
.CommandText
= "UPDATE [dbo].[OnlineCourse] SET [CourseID] = @CourseID, [URL] = @URL WHERE (([Cou"& _
5423 "rseID] = @Original_CourseID) AND ([URL] = @Original_URL));"&Global.Microsoft
.VisualBasic
.ChrW(13)&Global.Microsoft
.VisualBasic
.ChrW(10)&"SELECT CourseID, URL"& _
5424 " FROM OnlineCourse WHERE (CourseID = @CourseID)"
5425 Me._adapter
.UpdateCommand
.CommandType
= Global.System
.Data
.CommandType
.Text
5426 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@CourseID", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "CourseID", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
5427 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@URL", Global.System
.Data
.SqlDbType
.NVarChar
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "URL", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
5428 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_CourseID", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "CourseID", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
5429 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_URL", Global.System
.Data
.SqlDbType
.NVarChar
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "URL", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
5432 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
5433 Private Sub InitConnection()
5434 Me._connection
= New Global.System
.Data
.SqlClient
.SqlConnection
5435 Me._connection
.ConnectionString
= Global.VBUseADONET
.My
.MySettings
.Default
.SQLServer2005DBConnectionString
5438 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
5439 Private Sub InitCommandCollection()
5440 Me._commandCollection
= New Global.System
.Data
.SqlClient
.SqlCommand(0) {}
5441 Me._commandCollection(0) = New Global.System
.Data
.SqlClient
.SqlCommand
5442 Me._commandCollection(0).Connection
= Me.Connection
5443 Me._commandCollection(0).CommandText
= "SELECT CourseID, URL FROM dbo.OnlineCourse"
5444 Me._commandCollection(0).CommandType
= Global.System
.Data
.CommandType
.Text
5447 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
5448 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter"), _
5449 Global.System
.ComponentModel
.DataObjectMethodAttribute(Global.System
.ComponentModel
.DataObjectMethodType
.Fill
, true)> _
5450 Public Overloads Overridable
Function Fill(ByVal dataTable
As SQLServer2005DBDataSet
.OnlineCourseDataTable
) As Integer
5451 Me.Adapter
.SelectCommand
= Me.CommandCollection(0)
5452 If (Me.ClearBeforeFill
= true) Then
5455 Dim returnValue
As Integer = Me.Adapter
.Fill(dataTable
)
5459 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
5460 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter"), _
5461 Global.System
.ComponentModel
.DataObjectMethodAttribute(Global.System
.ComponentModel
.DataObjectMethodType
.[Select], true)> _
5462 Public Overloads Overridable
Function GetData() As SQLServer2005DBDataSet
.OnlineCourseDataTable
5463 Me.Adapter
.SelectCommand
= Me.CommandCollection(0)
5464 Dim dataTable
As SQLServer2005DBDataSet
.OnlineCourseDataTable
= New SQLServer2005DBDataSet
.OnlineCourseDataTable
5465 Me.Adapter
.Fill(dataTable
)
5469 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
5470 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter")> _
5471 Public Overloads Overridable
Function Update(ByVal dataTable
As SQLServer2005DBDataSet
.OnlineCourseDataTable
) As Integer
5472 Return Me.Adapter
.Update(dataTable
)
5475 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
5476 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter")> _
5477 Public Overloads Overridable
Function Update(ByVal dataSet
As SQLServer2005DBDataSet
) As Integer
5478 Return Me.Adapter
.Update(dataSet
, "OnlineCourse")
5481 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
5482 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter")> _
5483 Public Overloads Overridable
Function Update(ByVal dataRow
As Global.System
.Data
.DataRow
) As Integer
5484 Return Me.Adapter
.Update(New Global.System
.Data
.DataRow() {dataRow
})
5487 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
5488 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter")> _
5489 Public Overloads Overridable
Function Update(ByVal dataRows() As Global.System
.Data
.DataRow
) As Integer
5490 Return Me.Adapter
.Update(dataRows
)
5493 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
5494 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter"), _
5495 Global.System
.ComponentModel
.DataObjectMethodAttribute(Global.System
.ComponentModel
.DataObjectMethodType
.Delete
, true)> _
5496 Public Overloads Overridable
Function Delete(ByVal Original_CourseID
As Integer, ByVal Original_URL
As String) As Integer
5497 Me.Adapter
.DeleteCommand
.Parameters(0).Value
= CType(Original_CourseID
,Integer)
5498 If (Original_URL Is
Nothing) Then
5499 Throw
New Global.System
.ArgumentNullException("Original_URL")
5501 Me.Adapter
.DeleteCommand
.Parameters(1).Value
= CType(Original_URL
,String)
5503 Dim previousConnectionState
As Global.System
.Data
.ConnectionState
= Me.Adapter
.DeleteCommand
.Connection
.State
5504 If ((Me.Adapter
.DeleteCommand
.Connection
.State
And Global.System
.Data
.ConnectionState
.Open
) _
5505 <> Global.System
.Data
.ConnectionState
.Open
) Then
5506 Me.Adapter
.DeleteCommand
.Connection
.Open
5509 Dim returnValue
As Integer = Me.Adapter
.DeleteCommand
.ExecuteNonQuery
5512 If (previousConnectionState
= Global.System
.Data
.ConnectionState
.Closed
) Then
5513 Me.Adapter
.DeleteCommand
.Connection
.Close
5518 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
5519 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter"), _
5520 Global.System
.ComponentModel
.DataObjectMethodAttribute(Global.System
.ComponentModel
.DataObjectMethodType
.Insert
, true)> _
5521 Public Overloads Overridable
Function Insert(ByVal CourseID
As Integer, ByVal URL
As String) As Integer
5522 Me.Adapter
.InsertCommand
.Parameters(0).Value
= CType(CourseID
,Integer)
5523 If (URL Is
Nothing) Then
5524 Throw
New Global.System
.ArgumentNullException("URL")
5526 Me.Adapter
.InsertCommand
.Parameters(1).Value
= CType(URL
,String)
5528 Dim previousConnectionState
As Global.System
.Data
.ConnectionState
= Me.Adapter
.InsertCommand
.Connection
.State
5529 If ((Me.Adapter
.InsertCommand
.Connection
.State
And Global.System
.Data
.ConnectionState
.Open
) _
5530 <> Global.System
.Data
.ConnectionState
.Open
) Then
5531 Me.Adapter
.InsertCommand
.Connection
.Open
5534 Dim returnValue
As Integer = Me.Adapter
.InsertCommand
.ExecuteNonQuery
5537 If (previousConnectionState
= Global.System
.Data
.ConnectionState
.Closed
) Then
5538 Me.Adapter
.InsertCommand
.Connection
.Close
5543 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
5544 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter"), _
5545 Global.System
.ComponentModel
.DataObjectMethodAttribute(Global.System
.ComponentModel
.DataObjectMethodType
.Update
, true)> _
5546 Public Overloads Overridable
Function Update(ByVal CourseID
As Integer, ByVal URL
As String, ByVal Original_CourseID
As Integer, ByVal Original_URL
As String) As Integer
5547 Me.Adapter
.UpdateCommand
.Parameters(0).Value
= CType(CourseID
,Integer)
5548 If (URL Is
Nothing) Then
5549 Throw
New Global.System
.ArgumentNullException("URL")
5551 Me.Adapter
.UpdateCommand
.Parameters(1).Value
= CType(URL
,String)
5553 Me.Adapter
.UpdateCommand
.Parameters(2).Value
= CType(Original_CourseID
,Integer)
5554 If (Original_URL Is
Nothing) Then
5555 Throw
New Global.System
.ArgumentNullException("Original_URL")
5557 Me.Adapter
.UpdateCommand
.Parameters(3).Value
= CType(Original_URL
,String)
5559 Dim previousConnectionState
As Global.System
.Data
.ConnectionState
= Me.Adapter
.UpdateCommand
.Connection
.State
5560 If ((Me.Adapter
.UpdateCommand
.Connection
.State
And Global.System
.Data
.ConnectionState
.Open
) _
5561 <> Global.System
.Data
.ConnectionState
.Open
) Then
5562 Me.Adapter
.UpdateCommand
.Connection
.Open
5565 Dim returnValue
As Integer = Me.Adapter
.UpdateCommand
.ExecuteNonQuery
5568 If (previousConnectionState
= Global.System
.Data
.ConnectionState
.Closed
) Then
5569 Me.Adapter
.UpdateCommand
.Connection
.Close
5574 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
5575 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter"), _
5576 Global.System
.ComponentModel
.DataObjectMethodAttribute(Global.System
.ComponentModel
.DataObjectMethodType
.Update
, true)> _
5577 Public Overloads Overridable
Function Update(ByVal URL
As String, ByVal Original_CourseID
As Integer, ByVal Original_URL
As String) As Integer
5578 Return Me.Update(Original_CourseID
, URL
, Original_CourseID
, Original_URL
)
5583 '''Represents the connection and commands used to retrieve and save data.
5585 <Global.System
.CodeDom
.Compiler
.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
5586 Global.System
.ComponentModel
.DesignerCategoryAttribute("code"), _
5587 Global.System
.ComponentModel
.ToolboxItem(true), _
5588 Global.System
.ComponentModel
.DataObjectAttribute(true), _
5589 Global.System
.ComponentModel
.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
5590 ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
5591 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter")> _
5592 Partial
Public Class OnsiteCourseTableAdapter
5593 Inherits
Global.System
.ComponentModel
.Component
5595 Private WithEvents _adapter
As Global.System
.Data
.SqlClient
.SqlDataAdapter
5597 Private _connection
As Global.System
.Data
.SqlClient
.SqlConnection
5599 Private _transaction
As Global.System
.Data
.SqlClient
.SqlTransaction
5601 Private _commandCollection() As Global.System
.Data
.SqlClient
.SqlCommand
5603 Private _clearBeforeFill
As Boolean
5605 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
5608 Me.ClearBeforeFill
= true
5611 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
5612 Protected
Friend ReadOnly
Property Adapter() As Global.System
.Data
.SqlClient
.SqlDataAdapter
5614 If (Me._adapter Is
Nothing) Then
5621 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
5622 Friend Property Connection() As Global.System
.Data
.SqlClient
.SqlConnection
5624 If (Me._connection Is
Nothing) Then
5627 Return Me._connection
5630 Me._connection
= value
5631 If (Not (Me.Adapter
.InsertCommand
) Is
Nothing) Then
5632 Me.Adapter
.InsertCommand
.Connection
= value
5634 If (Not (Me.Adapter
.DeleteCommand
) Is
Nothing) Then
5635 Me.Adapter
.DeleteCommand
.Connection
= value
5637 If (Not (Me.Adapter
.UpdateCommand
) Is
Nothing) Then
5638 Me.Adapter
.UpdateCommand
.Connection
= value
5640 Dim i
As Integer = 0
5641 Do While (i
< Me.CommandCollection
.Length
)
5642 If (Not (Me.CommandCollection(i
)) Is
Nothing) Then
5643 CType(Me.CommandCollection(i
),Global.System
.Data
.SqlClient
.SqlCommand
).Connection
= value
5650 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
5651 Friend Property Transaction() As Global.System
.Data
.SqlClient
.SqlTransaction
5653 Return Me._transaction
5656 Me._transaction
= value
5657 Dim i
As Integer = 0
5658 Do While (i
< Me.CommandCollection
.Length
)
5659 Me.CommandCollection(i
).Transaction
= Me._transaction
5662 If ((Not (Me.Adapter
) Is
Nothing) _
5663 AndAlso (Not (Me.Adapter
.DeleteCommand
) Is
Nothing)) Then
5664 Me.Adapter
.DeleteCommand
.Transaction
= Me._transaction
5666 If ((Not (Me.Adapter
) Is
Nothing) _
5667 AndAlso (Not (Me.Adapter
.InsertCommand
) Is
Nothing)) Then
5668 Me.Adapter
.InsertCommand
.Transaction
= Me._transaction
5670 If ((Not (Me.Adapter
) Is
Nothing) _
5671 AndAlso (Not (Me.Adapter
.UpdateCommand
) Is
Nothing)) Then
5672 Me.Adapter
.UpdateCommand
.Transaction
= Me._transaction
5677 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
5678 Protected ReadOnly
Property CommandCollection() As Global.System
.Data
.SqlClient
.SqlCommand()
5680 If (Me._commandCollection Is
Nothing) Then
5681 Me.InitCommandCollection
5683 Return Me._commandCollection
5687 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
5688 Public Property ClearBeforeFill() As Boolean
5690 Return Me._clearBeforeFill
5693 Me._clearBeforeFill
= value
5697 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
5698 Private Sub InitAdapter()
5699 Me._adapter
= New Global.System
.Data
.SqlClient
.SqlDataAdapter
5700 Dim tableMapping
As Global.System
.Data
.Common
.DataTableMapping
= New Global.System
.Data
.Common
.DataTableMapping
5701 tableMapping
.SourceTable
= "Table"
5702 tableMapping
.DataSetTable
= "OnsiteCourse"
5703 tableMapping
.ColumnMappings
.Add("CourseID", "CourseID")
5704 tableMapping
.ColumnMappings
.Add("Location", "Location")
5705 tableMapping
.ColumnMappings
.Add("Days", "Days")
5706 tableMapping
.ColumnMappings
.Add("Time", "Time")
5707 Me._adapter
.TableMappings
.Add(tableMapping
)
5708 Me._adapter
.DeleteCommand
= New Global.System
.Data
.SqlClient
.SqlCommand
5709 Me._adapter
.DeleteCommand
.Connection
= Me.Connection
5710 Me._adapter
.DeleteCommand
.CommandText
= "DELETE FROM [dbo].[OnsiteCourse] WHERE (([CourseID] = @Original_CourseID) AND ([L"& _
5711 "ocation] = @Original_Location) AND ([Days] = @Original_Days) AND ([Time] = @Orig"& _
5713 Me._adapter
.DeleteCommand
.CommandType
= Global.System
.Data
.CommandType
.Text
5714 Me._adapter
.DeleteCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_CourseID", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "CourseID", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
5715 Me._adapter
.DeleteCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_Location", Global.System
.Data
.SqlDbType
.NVarChar
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "Location", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
5716 Me._adapter
.DeleteCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_Days", Global.System
.Data
.SqlDbType
.NVarChar
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "Days", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
5717 Me._adapter
.DeleteCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_Time", Global.System
.Data
.SqlDbType
.SmallDateTime
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "Time", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
5718 Me._adapter
.InsertCommand
= New Global.System
.Data
.SqlClient
.SqlCommand
5719 Me._adapter
.InsertCommand
.Connection
= Me.Connection
5720 Me._adapter
.InsertCommand
.CommandText
= "INSERT INTO [dbo].[OnsiteCourse] ([CourseID], [Location], [Days], [Time]) VALUES "& _
5721 "(@CourseID, @Location, @Days, @Time);"&Global.Microsoft
.VisualBasic
.ChrW(13)&Global.Microsoft
.VisualBasic
.ChrW(10)&"SELECT CourseID, Location, Days, Time FRO"& _
5722 "M OnsiteCourse WHERE (CourseID = @CourseID)"
5723 Me._adapter
.InsertCommand
.CommandType
= Global.System
.Data
.CommandType
.Text
5724 Me._adapter
.InsertCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@CourseID", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "CourseID", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
5725 Me._adapter
.InsertCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Location", Global.System
.Data
.SqlDbType
.NVarChar
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "Location", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
5726 Me._adapter
.InsertCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Days", Global.System
.Data
.SqlDbType
.NVarChar
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "Days", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
5727 Me._adapter
.InsertCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Time", Global.System
.Data
.SqlDbType
.SmallDateTime
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "Time", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
5728 Me._adapter
.UpdateCommand
= New Global.System
.Data
.SqlClient
.SqlCommand
5729 Me._adapter
.UpdateCommand
.Connection
= Me.Connection
5730 Me._adapter
.UpdateCommand
.CommandText
= "UPDATE [dbo].[OnsiteCourse] SET [CourseID] = @CourseID, [Location] = @Location, ["& _
5731 "Days] = @Days, [Time] = @Time WHERE (([CourseID] = @Original_CourseID) AND ([Loc"& _
5732 "ation] = @Original_Location) AND ([Days] = @Original_Days) AND ([Time] = @Origin"& _
5733 "al_Time));"&Global.Microsoft
.VisualBasic
.ChrW(13)&Global.Microsoft
.VisualBasic
.ChrW(10)&"SELECT CourseID, Location, Days, Time FROM OnsiteCourse WHERE (Cours"& _
5735 Me._adapter
.UpdateCommand
.CommandType
= Global.System
.Data
.CommandType
.Text
5736 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@CourseID", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "CourseID", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
5737 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Location", Global.System
.Data
.SqlDbType
.NVarChar
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "Location", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
5738 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Days", Global.System
.Data
.SqlDbType
.NVarChar
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "Days", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
5739 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Time", Global.System
.Data
.SqlDbType
.SmallDateTime
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "Time", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
5740 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_CourseID", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "CourseID", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
5741 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_Location", Global.System
.Data
.SqlDbType
.NVarChar
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "Location", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
5742 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_Days", Global.System
.Data
.SqlDbType
.NVarChar
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "Days", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
5743 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_Time", Global.System
.Data
.SqlDbType
.SmallDateTime
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "Time", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
5746 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
5747 Private Sub InitConnection()
5748 Me._connection
= New Global.System
.Data
.SqlClient
.SqlConnection
5749 Me._connection
.ConnectionString
= Global.VBUseADONET
.My
.Settings
.SQLServer2005DBConnectionString
5752 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
5753 Private Sub InitCommandCollection()
5754 Me._commandCollection
= New Global.System
.Data
.SqlClient
.SqlCommand(0) {}
5755 Me._commandCollection(0) = New Global.System
.Data
.SqlClient
.SqlCommand
5756 Me._commandCollection(0).Connection
= Me.Connection
5757 Me._commandCollection(0).CommandText
= "SELECT CourseID, Location, Days, Time FROM dbo.OnsiteCourse"
5758 Me._commandCollection(0).CommandType
= Global.System
.Data
.CommandType
.Text
5761 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
5762 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter"), _
5763 Global.System
.ComponentModel
.DataObjectMethodAttribute(Global.System
.ComponentModel
.DataObjectMethodType
.Fill
, true)> _
5764 Public Overloads Overridable
Function Fill(ByVal dataTable
As SQLServer2005DBDataSet
.OnsiteCourseDataTable
) As Integer
5765 Me.Adapter
.SelectCommand
= Me.CommandCollection(0)
5766 If (Me.ClearBeforeFill
= true) Then
5769 Dim returnValue
As Integer = Me.Adapter
.Fill(dataTable
)
5773 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
5774 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter"), _
5775 Global.System
.ComponentModel
.DataObjectMethodAttribute(Global.System
.ComponentModel
.DataObjectMethodType
.[Select], true)> _
5776 Public Overloads Overridable
Function GetData() As SQLServer2005DBDataSet
.OnsiteCourseDataTable
5777 Me.Adapter
.SelectCommand
= Me.CommandCollection(0)
5778 Dim dataTable
As SQLServer2005DBDataSet
.OnsiteCourseDataTable
= New SQLServer2005DBDataSet
.OnsiteCourseDataTable
5779 Me.Adapter
.Fill(dataTable
)
5783 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
5784 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter")> _
5785 Public Overloads Overridable
Function Update(ByVal dataTable
As SQLServer2005DBDataSet
.OnsiteCourseDataTable
) As Integer
5786 Return Me.Adapter
.Update(dataTable
)
5789 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
5790 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter")> _
5791 Public Overloads Overridable
Function Update(ByVal dataSet
As SQLServer2005DBDataSet
) As Integer
5792 Return Me.Adapter
.Update(dataSet
, "OnsiteCourse")
5795 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
5796 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter")> _
5797 Public Overloads Overridable
Function Update(ByVal dataRow
As Global.System
.Data
.DataRow
) As Integer
5798 Return Me.Adapter
.Update(New Global.System
.Data
.DataRow() {dataRow
})
5801 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
5802 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter")> _
5803 Public Overloads Overridable
Function Update(ByVal dataRows() As Global.System
.Data
.DataRow
) As Integer
5804 Return Me.Adapter
.Update(dataRows
)
5807 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
5808 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter"), _
5809 Global.System
.ComponentModel
.DataObjectMethodAttribute(Global.System
.ComponentModel
.DataObjectMethodType
.Delete
, true)> _
5810 Public Overloads Overridable
Function Delete(ByVal Original_CourseID
As Integer, ByVal Original_Location
As String, ByVal Original_Days
As String, ByVal Original_Time
As Date) As Integer
5811 Me.Adapter
.DeleteCommand
.Parameters(0).Value
= CType(Original_CourseID
,Integer)
5812 If (Original_Location Is
Nothing) Then
5813 Throw
New Global.System
.ArgumentNullException("Original_Location")
5815 Me.Adapter
.DeleteCommand
.Parameters(1).Value
= CType(Original_Location
,String)
5817 If (Original_Days Is
Nothing) Then
5818 Throw
New Global.System
.ArgumentNullException("Original_Days")
5820 Me.Adapter
.DeleteCommand
.Parameters(2).Value
= CType(Original_Days
,String)
5822 Me.Adapter
.DeleteCommand
.Parameters(3).Value
= CType(Original_Time
,Date)
5823 Dim previousConnectionState
As Global.System
.Data
.ConnectionState
= Me.Adapter
.DeleteCommand
.Connection
.State
5824 If ((Me.Adapter
.DeleteCommand
.Connection
.State
And Global.System
.Data
.ConnectionState
.Open
) _
5825 <> Global.System
.Data
.ConnectionState
.Open
) Then
5826 Me.Adapter
.DeleteCommand
.Connection
.Open
5829 Dim returnValue
As Integer = Me.Adapter
.DeleteCommand
.ExecuteNonQuery
5832 If (previousConnectionState
= Global.System
.Data
.ConnectionState
.Closed
) Then
5833 Me.Adapter
.DeleteCommand
.Connection
.Close
5838 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
5839 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter"), _
5840 Global.System
.ComponentModel
.DataObjectMethodAttribute(Global.System
.ComponentModel
.DataObjectMethodType
.Insert
, true)> _
5841 Public Overloads Overridable
Function Insert(ByVal CourseID
As Integer, ByVal Location
As String, ByVal Days
As String, ByVal Time
As Date) As Integer
5842 Me.Adapter
.InsertCommand
.Parameters(0).Value
= CType(CourseID
,Integer)
5843 If (Location Is
Nothing) Then
5844 Throw
New Global.System
.ArgumentNullException("Location")
5846 Me.Adapter
.InsertCommand
.Parameters(1).Value
= CType(Location
,String)
5848 If (Days Is
Nothing) Then
5849 Throw
New Global.System
.ArgumentNullException("Days")
5851 Me.Adapter
.InsertCommand
.Parameters(2).Value
= CType(Days
,String)
5853 Me.Adapter
.InsertCommand
.Parameters(3).Value
= CType(Time
,Date)
5854 Dim previousConnectionState
As Global.System
.Data
.ConnectionState
= Me.Adapter
.InsertCommand
.Connection
.State
5855 If ((Me.Adapter
.InsertCommand
.Connection
.State
And Global.System
.Data
.ConnectionState
.Open
) _
5856 <> Global.System
.Data
.ConnectionState
.Open
) Then
5857 Me.Adapter
.InsertCommand
.Connection
.Open
5860 Dim returnValue
As Integer = Me.Adapter
.InsertCommand
.ExecuteNonQuery
5863 If (previousConnectionState
= Global.System
.Data
.ConnectionState
.Closed
) Then
5864 Me.Adapter
.InsertCommand
.Connection
.Close
5869 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
5870 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter"), _
5871 Global.System
.ComponentModel
.DataObjectMethodAttribute(Global.System
.ComponentModel
.DataObjectMethodType
.Update
, true)> _
5872 Public Overloads Overridable
Function Update(ByVal CourseID
As Integer, ByVal Location
As String, ByVal Days
As String, ByVal Time
As Date, ByVal Original_CourseID
As Integer, ByVal Original_Location
As String, ByVal Original_Days
As String, ByVal Original_Time
As Date) As Integer
5873 Me.Adapter
.UpdateCommand
.Parameters(0).Value
= CType(CourseID
,Integer)
5874 If (Location Is
Nothing) Then
5875 Throw
New Global.System
.ArgumentNullException("Location")
5877 Me.Adapter
.UpdateCommand
.Parameters(1).Value
= CType(Location
,String)
5879 If (Days Is
Nothing) Then
5880 Throw
New Global.System
.ArgumentNullException("Days")
5882 Me.Adapter
.UpdateCommand
.Parameters(2).Value
= CType(Days
,String)
5884 Me.Adapter
.UpdateCommand
.Parameters(3).Value
= CType(Time
,Date)
5885 Me.Adapter
.UpdateCommand
.Parameters(4).Value
= CType(Original_CourseID
,Integer)
5886 If (Original_Location Is
Nothing) Then
5887 Throw
New Global.System
.ArgumentNullException("Original_Location")
5889 Me.Adapter
.UpdateCommand
.Parameters(5).Value
= CType(Original_Location
,String)
5891 If (Original_Days Is
Nothing) Then
5892 Throw
New Global.System
.ArgumentNullException("Original_Days")
5894 Me.Adapter
.UpdateCommand
.Parameters(6).Value
= CType(Original_Days
,String)
5896 Me.Adapter
.UpdateCommand
.Parameters(7).Value
= CType(Original_Time
,Date)
5897 Dim previousConnectionState
As Global.System
.Data
.ConnectionState
= Me.Adapter
.UpdateCommand
.Connection
.State
5898 If ((Me.Adapter
.UpdateCommand
.Connection
.State
And Global.System
.Data
.ConnectionState
.Open
) _
5899 <> Global.System
.Data
.ConnectionState
.Open
) Then
5900 Me.Adapter
.UpdateCommand
.Connection
.Open
5903 Dim returnValue
As Integer = Me.Adapter
.UpdateCommand
.ExecuteNonQuery
5906 If (previousConnectionState
= Global.System
.Data
.ConnectionState
.Closed
) Then
5907 Me.Adapter
.UpdateCommand
.Connection
.Close
5912 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
5913 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter"), _
5914 Global.System
.ComponentModel
.DataObjectMethodAttribute(Global.System
.ComponentModel
.DataObjectMethodType
.Update
, true)> _
5915 Public Overloads Overridable
Function Update(ByVal Location
As String, ByVal Days
As String, ByVal Time
As Date, ByVal Original_CourseID
As Integer, ByVal Original_Location
As String, ByVal Original_Days
As String, ByVal Original_Time
As Date) As Integer
5916 Return Me.Update(Original_CourseID
, Location
, Days
, Time
, Original_CourseID
, Original_Location
, Original_Days
, Original_Time
)
5921 '''Represents the connection and commands used to retrieve and save data.
5923 <Global.System
.CodeDom
.Compiler
.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
5924 Global.System
.ComponentModel
.DesignerCategoryAttribute("code"), _
5925 Global.System
.ComponentModel
.ToolboxItem(true), _
5926 Global.System
.ComponentModel
.DataObjectAttribute(true), _
5927 Global.System
.ComponentModel
.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner"& _
5928 ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
5929 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter")> _
5930 Partial
Public Class PersonTableAdapter
5931 Inherits
Global.System
.ComponentModel
.Component
5933 Private WithEvents _adapter
As Global.System
.Data
.SqlClient
.SqlDataAdapter
5935 Private _connection
As Global.System
.Data
.SqlClient
.SqlConnection
5937 Private _transaction
As Global.System
.Data
.SqlClient
.SqlTransaction
5939 Private _commandCollection() As Global.System
.Data
.SqlClient
.SqlCommand
5941 Private _clearBeforeFill
As Boolean
5943 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
5946 Me.ClearBeforeFill
= true
5949 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
5950 Protected
Friend ReadOnly
Property Adapter() As Global.System
.Data
.SqlClient
.SqlDataAdapter
5952 If (Me._adapter Is
Nothing) Then
5959 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
5960 Friend Property Connection() As Global.System
.Data
.SqlClient
.SqlConnection
5962 If (Me._connection Is
Nothing) Then
5965 Return Me._connection
5968 Me._connection
= value
5969 If (Not (Me.Adapter
.InsertCommand
) Is
Nothing) Then
5970 Me.Adapter
.InsertCommand
.Connection
= value
5972 If (Not (Me.Adapter
.DeleteCommand
) Is
Nothing) Then
5973 Me.Adapter
.DeleteCommand
.Connection
= value
5975 If (Not (Me.Adapter
.UpdateCommand
) Is
Nothing) Then
5976 Me.Adapter
.UpdateCommand
.Connection
= value
5978 Dim i
As Integer = 0
5979 Do While (i
< Me.CommandCollection
.Length
)
5980 If (Not (Me.CommandCollection(i
)) Is
Nothing) Then
5981 CType(Me.CommandCollection(i
),Global.System
.Data
.SqlClient
.SqlCommand
).Connection
= value
5988 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
5989 Friend Property Transaction() As Global.System
.Data
.SqlClient
.SqlTransaction
5991 Return Me._transaction
5994 Me._transaction
= value
5995 Dim i
As Integer = 0
5996 Do While (i
< Me.CommandCollection
.Length
)
5997 Me.CommandCollection(i
).Transaction
= Me._transaction
6000 If ((Not (Me.Adapter
) Is
Nothing) _
6001 AndAlso (Not (Me.Adapter
.DeleteCommand
) Is
Nothing)) Then
6002 Me.Adapter
.DeleteCommand
.Transaction
= Me._transaction
6004 If ((Not (Me.Adapter
) Is
Nothing) _
6005 AndAlso (Not (Me.Adapter
.InsertCommand
) Is
Nothing)) Then
6006 Me.Adapter
.InsertCommand
.Transaction
= Me._transaction
6008 If ((Not (Me.Adapter
) Is
Nothing) _
6009 AndAlso (Not (Me.Adapter
.UpdateCommand
) Is
Nothing)) Then
6010 Me.Adapter
.UpdateCommand
.Transaction
= Me._transaction
6015 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
6016 Protected ReadOnly
Property CommandCollection() As Global.System
.Data
.SqlClient
.SqlCommand()
6018 If (Me._commandCollection Is
Nothing) Then
6019 Me.InitCommandCollection
6021 Return Me._commandCollection
6025 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
6026 Public Property ClearBeforeFill() As Boolean
6028 Return Me._clearBeforeFill
6031 Me._clearBeforeFill
= value
6035 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
6036 Private Sub InitAdapter()
6037 Me._adapter
= New Global.System
.Data
.SqlClient
.SqlDataAdapter
6038 Dim tableMapping
As Global.System
.Data
.Common
.DataTableMapping
= New Global.System
.Data
.Common
.DataTableMapping
6039 tableMapping
.SourceTable
= "Table"
6040 tableMapping
.DataSetTable
= "Person"
6041 tableMapping
.ColumnMappings
.Add("PersonID", "PersonID")
6042 tableMapping
.ColumnMappings
.Add("LastName", "LastName")
6043 tableMapping
.ColumnMappings
.Add("FirstName", "FirstName")
6044 tableMapping
.ColumnMappings
.Add("HireDate", "HireDate")
6045 tableMapping
.ColumnMappings
.Add("EnrollmentDate", "EnrollmentDate")
6046 tableMapping
.ColumnMappings
.Add("Picture", "Picture")
6047 tableMapping
.ColumnMappings
.Add("PersonCategory", "PersonCategory")
6048 Me._adapter
.TableMappings
.Add(tableMapping
)
6049 Me._adapter
.DeleteCommand
= New Global.System
.Data
.SqlClient
.SqlCommand
6050 Me._adapter
.DeleteCommand
.Connection
= Me.Connection
6051 Me._adapter
.DeleteCommand
.CommandText
= "DELETE FROM [dbo].[Person] WHERE (([PersonID] = @Original_PersonID) AND ([LastNam"& _
6052 "e] = @Original_LastName) AND ([FirstName] = @Original_FirstName) AND ((@IsNull_H"& _
6053 "ireDate = 1 AND [HireDate] IS NULL) OR ([HireDate] = @Original_HireDate)) AND (("& _
6054 "@IsNull_EnrollmentDate = 1 AND [EnrollmentDate] IS NULL) OR ([EnrollmentDate] = "& _
6055 "@Original_EnrollmentDate)) AND ([PersonCategory] = @Original_PersonCategory))"
6056 Me._adapter
.DeleteCommand
.CommandType
= Global.System
.Data
.CommandType
.Text
6057 Me._adapter
.DeleteCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_PersonID", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "PersonID", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
6058 Me._adapter
.DeleteCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_LastName", Global.System
.Data
.SqlDbType
.NVarChar
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "LastName", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
6059 Me._adapter
.DeleteCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_FirstName", Global.System
.Data
.SqlDbType
.NVarChar
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "FirstName", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
6060 Me._adapter
.DeleteCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@IsNull_HireDate", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "HireDate", Global.System
.Data
.DataRowVersion
.Original
, true, Nothing, "", "", ""))
6061 Me._adapter
.DeleteCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_HireDate", Global.System
.Data
.SqlDbType
.DateTime
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "HireDate", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
6062 Me._adapter
.DeleteCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@IsNull_EnrollmentDate", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "EnrollmentDate", Global.System
.Data
.DataRowVersion
.Original
, true, Nothing, "", "", ""))
6063 Me._adapter
.DeleteCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_EnrollmentDate", Global.System
.Data
.SqlDbType
.DateTime
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "EnrollmentDate", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
6064 Me._adapter
.DeleteCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_PersonCategory", Global.System
.Data
.SqlDbType
.SmallInt
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "PersonCategory", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
6065 Me._adapter
.InsertCommand
= New Global.System
.Data
.SqlClient
.SqlCommand
6066 Me._adapter
.InsertCommand
.Connection
= Me.Connection
6067 Me._adapter
.InsertCommand
.CommandText
= "INSERT INTO [dbo].[Person] ([LastName], [FirstName], [HireDate], [EnrollmentDate]"& _
6068 ", [Picture], [PersonCategory]) VALUES (@LastName, @FirstName, @HireDate, @Enroll"& _
6069 "mentDate, @Picture, @PersonCategory);"&Global.Microsoft
.VisualBasic
.ChrW(13)&Global.Microsoft
.VisualBasic
.ChrW(10)&"SELECT PersonID, LastName, FirstName, Hir"& _
6070 "eDate, EnrollmentDate, Picture, PersonCategory FROM Person WHERE (PersonID = SCO"& _
6072 Me._adapter
.InsertCommand
.CommandType
= Global.System
.Data
.CommandType
.Text
6073 Me._adapter
.InsertCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@LastName", Global.System
.Data
.SqlDbType
.NVarChar
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "LastName", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
6074 Me._adapter
.InsertCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@FirstName", Global.System
.Data
.SqlDbType
.NVarChar
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "FirstName", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
6075 Me._adapter
.InsertCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@HireDate", Global.System
.Data
.SqlDbType
.DateTime
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "HireDate", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
6076 Me._adapter
.InsertCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@EnrollmentDate", Global.System
.Data
.SqlDbType
.DateTime
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "EnrollmentDate", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
6077 Me._adapter
.InsertCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Picture", Global.System
.Data
.SqlDbType
.Image
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "Picture", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
6078 Me._adapter
.InsertCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@PersonCategory", Global.System
.Data
.SqlDbType
.SmallInt
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "PersonCategory", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
6079 Me._adapter
.UpdateCommand
= New Global.System
.Data
.SqlClient
.SqlCommand
6080 Me._adapter
.UpdateCommand
.Connection
= Me.Connection
6081 Me._adapter
.UpdateCommand
.CommandText
= "UPDATE [dbo].[Person] SET [LastName] = @LastName, [FirstName] = @FirstName, [Hire"& _
6082 "Date] = @HireDate, [EnrollmentDate] = @EnrollmentDate, [Picture] = @Picture, [Pe"& _
6083 "rsonCategory] = @PersonCategory WHERE (([PersonID] = @Original_PersonID) AND ([L"& _
6084 "astName] = @Original_LastName) AND ([FirstName] = @Original_FirstName) AND ((@Is"& _
6085 "Null_HireDate = 1 AND [HireDate] IS NULL) OR ([HireDate] = @Original_HireDate)) "& _
6086 "AND ((@IsNull_EnrollmentDate = 1 AND [EnrollmentDate] IS NULL) OR ([EnrollmentDa"& _
6087 "te] = @Original_EnrollmentDate)) AND ([PersonCategory] = @Original_PersonCategor"& _
6088 "y));"&Global.Microsoft
.VisualBasic
.ChrW(13)&Global.Microsoft
.VisualBasic
.ChrW(10)&"SELECT PersonID, LastName, FirstName, HireDate, EnrollmentDate, Picture, P"& _
6089 "ersonCategory FROM Person WHERE (PersonID = @PersonID)"
6090 Me._adapter
.UpdateCommand
.CommandType
= Global.System
.Data
.CommandType
.Text
6091 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@LastName", Global.System
.Data
.SqlDbType
.NVarChar
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "LastName", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
6092 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@FirstName", Global.System
.Data
.SqlDbType
.NVarChar
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "FirstName", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
6093 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@HireDate", Global.System
.Data
.SqlDbType
.DateTime
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "HireDate", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
6094 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@EnrollmentDate", Global.System
.Data
.SqlDbType
.DateTime
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "EnrollmentDate", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
6095 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Picture", Global.System
.Data
.SqlDbType
.Image
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "Picture", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
6096 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@PersonCategory", Global.System
.Data
.SqlDbType
.SmallInt
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "PersonCategory", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
6097 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_PersonID", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "PersonID", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
6098 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_LastName", Global.System
.Data
.SqlDbType
.NVarChar
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "LastName", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
6099 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_FirstName", Global.System
.Data
.SqlDbType
.NVarChar
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "FirstName", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
6100 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@IsNull_HireDate", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "HireDate", Global.System
.Data
.DataRowVersion
.Original
, true, Nothing, "", "", ""))
6101 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_HireDate", Global.System
.Data
.SqlDbType
.DateTime
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "HireDate", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
6102 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@IsNull_EnrollmentDate", Global.System
.Data
.SqlDbType
.Int
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "EnrollmentDate", Global.System
.Data
.DataRowVersion
.Original
, true, Nothing, "", "", ""))
6103 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_EnrollmentDate", Global.System
.Data
.SqlDbType
.DateTime
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "EnrollmentDate", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
6104 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@Original_PersonCategory", Global.System
.Data
.SqlDbType
.SmallInt
, 0, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "PersonCategory", Global.System
.Data
.DataRowVersion
.Original
, false, Nothing, "", "", ""))
6105 Me._adapter
.UpdateCommand
.Parameters
.Add(New Global.System
.Data
.SqlClient
.SqlParameter("@PersonID", Global.System
.Data
.SqlDbType
.Int
, 4, Global.System
.Data
.ParameterDirection
.Input
, 0, 0, "PersonID", Global.System
.Data
.DataRowVersion
.Current
, false, Nothing, "", "", ""))
6108 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
6109 Private Sub InitConnection()
6110 Me._connection
= New Global.System
.Data
.SqlClient
.SqlConnection
6111 Me._connection
.ConnectionString
= Global.VBUseADONET
.My
.Settings
.SQLServer2005DBConnectionString
6114 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
6115 Private Sub InitCommandCollection()
6116 Me._commandCollection
= New Global.System
.Data
.SqlClient
.SqlCommand(0) {}
6117 Me._commandCollection(0) = New Global.System
.Data
.SqlClient
.SqlCommand
6118 Me._commandCollection(0).Connection
= Me.Connection
6119 Me._commandCollection(0).CommandText
= "SELECT PersonID, LastName, FirstName, HireDate, EnrollmentDate, Picture, PersonCa"& _
6120 "tegory FROM dbo.Person"
6121 Me._commandCollection(0).CommandType
= Global.System
.Data
.CommandType
.Text
6124 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
6125 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter"), _
6126 Global.System
.ComponentModel
.DataObjectMethodAttribute(Global.System
.ComponentModel
.DataObjectMethodType
.Fill
, true)> _
6127 Public Overloads Overridable
Function Fill(ByVal dataTable
As SQLServer2005DBDataSet
.PersonDataTable
) As Integer
6128 Me.Adapter
.SelectCommand
= Me.CommandCollection(0)
6129 If (Me.ClearBeforeFill
= true) Then
6132 Dim returnValue
As Integer = Me.Adapter
.Fill(dataTable
)
6136 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
6137 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter"), _
6138 Global.System
.ComponentModel
.DataObjectMethodAttribute(Global.System
.ComponentModel
.DataObjectMethodType
.[Select], true)> _
6139 Public Overloads Overridable
Function GetData() As SQLServer2005DBDataSet
.PersonDataTable
6140 Me.Adapter
.SelectCommand
= Me.CommandCollection(0)
6141 Dim dataTable
As SQLServer2005DBDataSet
.PersonDataTable
= New SQLServer2005DBDataSet
.PersonDataTable
6142 Me.Adapter
.Fill(dataTable
)
6146 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
6147 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter")> _
6148 Public Overloads Overridable
Function Update(ByVal dataTable
As SQLServer2005DBDataSet
.PersonDataTable
) As Integer
6149 Return Me.Adapter
.Update(dataTable
)
6152 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
6153 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter")> _
6154 Public Overloads Overridable
Function Update(ByVal dataSet
As SQLServer2005DBDataSet
) As Integer
6155 Return Me.Adapter
.Update(dataSet
, "Person")
6158 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
6159 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter")> _
6160 Public Overloads Overridable
Function Update(ByVal dataRow
As Global.System
.Data
.DataRow
) As Integer
6161 Return Me.Adapter
.Update(New Global.System
.Data
.DataRow() {dataRow
})
6164 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
6165 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter")> _
6166 Public Overloads Overridable
Function Update(ByVal dataRows() As Global.System
.Data
.DataRow
) As Integer
6167 Return Me.Adapter
.Update(dataRows
)
6170 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
6171 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter"), _
6172 Global.System
.ComponentModel
.DataObjectMethodAttribute(Global.System
.ComponentModel
.DataObjectMethodType
.Delete
, true)> _
6173 Public Overloads Overridable
Function Delete(ByVal Original_PersonID
As Integer, ByVal Original_LastName
As String, ByVal Original_FirstName
As String, ByVal Original_HireDate
As Global.System
.Nullable(Of
Date), ByVal Original_EnrollmentDate
As Global.System
.Nullable(Of
Date), ByVal Original_PersonCategory
As Short
) As Integer
6174 Me.Adapter
.DeleteCommand
.Parameters(0).Value
= CType(Original_PersonID
,Integer)
6175 If (Original_LastName Is
Nothing) Then
6176 Throw
New Global.System
.ArgumentNullException("Original_LastName")
6178 Me.Adapter
.DeleteCommand
.Parameters(1).Value
= CType(Original_LastName
,String)
6180 If (Original_FirstName Is
Nothing) Then
6181 Throw
New Global.System
.ArgumentNullException("Original_FirstName")
6183 Me.Adapter
.DeleteCommand
.Parameters(2).Value
= CType(Original_FirstName
,String)
6185 If (Original_HireDate
.HasValue
= true) Then
6186 Me.Adapter
.DeleteCommand
.Parameters(3).Value
= CType(0,Object)
6187 Me.Adapter
.DeleteCommand
.Parameters(4).Value
= CType(Original_HireDate
.Value
,Date)
6189 Me.Adapter
.DeleteCommand
.Parameters(3).Value
= CType(1,Object)
6190 Me.Adapter
.DeleteCommand
.Parameters(4).Value
= Global.System
.DBNull
.Value
6192 If (Original_EnrollmentDate
.HasValue
= true) Then
6193 Me.Adapter
.DeleteCommand
.Parameters(5).Value
= CType(0,Object)
6194 Me.Adapter
.DeleteCommand
.Parameters(6).Value
= CType(Original_EnrollmentDate
.Value
,Date)
6196 Me.Adapter
.DeleteCommand
.Parameters(5).Value
= CType(1,Object)
6197 Me.Adapter
.DeleteCommand
.Parameters(6).Value
= Global.System
.DBNull
.Value
6199 Me.Adapter
.DeleteCommand
.Parameters(7).Value
= CType(Original_PersonCategory
,Short
)
6200 Dim previousConnectionState
As Global.System
.Data
.ConnectionState
= Me.Adapter
.DeleteCommand
.Connection
.State
6201 If ((Me.Adapter
.DeleteCommand
.Connection
.State
And Global.System
.Data
.ConnectionState
.Open
) _
6202 <> Global.System
.Data
.ConnectionState
.Open
) Then
6203 Me.Adapter
.DeleteCommand
.Connection
.Open
6206 Dim returnValue
As Integer = Me.Adapter
.DeleteCommand
.ExecuteNonQuery
6209 If (previousConnectionState
= Global.System
.Data
.ConnectionState
.Closed
) Then
6210 Me.Adapter
.DeleteCommand
.Connection
.Close
6215 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
6216 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter"), _
6217 Global.System
.ComponentModel
.DataObjectMethodAttribute(Global.System
.ComponentModel
.DataObjectMethodType
.Insert
, true)> _
6218 Public Overloads Overridable
Function Insert(ByVal LastName
As String, ByVal FirstName
As String, ByVal HireDate
As Global.System
.Nullable(Of
Date), ByVal EnrollmentDate
As Global.System
.Nullable(Of
Date), ByVal Picture() As Byte, ByVal PersonCategory
As Short
) As Integer
6219 If (LastName Is
Nothing) Then
6220 Throw
New Global.System
.ArgumentNullException("LastName")
6222 Me.Adapter
.InsertCommand
.Parameters(0).Value
= CType(LastName
,String)
6224 If (FirstName Is
Nothing) Then
6225 Throw
New Global.System
.ArgumentNullException("FirstName")
6227 Me.Adapter
.InsertCommand
.Parameters(1).Value
= CType(FirstName
,String)
6229 If (HireDate
.HasValue
= true) Then
6230 Me.Adapter
.InsertCommand
.Parameters(2).Value
= CType(HireDate
.Value
,Date)
6232 Me.Adapter
.InsertCommand
.Parameters(2).Value
= Global.System
.DBNull
.Value
6234 If (EnrollmentDate
.HasValue
= true) Then
6235 Me.Adapter
.InsertCommand
.Parameters(3).Value
= CType(EnrollmentDate
.Value
,Date)
6237 Me.Adapter
.InsertCommand
.Parameters(3).Value
= Global.System
.DBNull
.Value
6239 If (Picture Is
Nothing) Then
6240 Me.Adapter
.InsertCommand
.Parameters(4).Value
= Global.System
.DBNull
.Value
6242 Me.Adapter
.InsertCommand
.Parameters(4).Value
= CType(Picture
,Byte())
6244 Me.Adapter
.InsertCommand
.Parameters(5).Value
= CType(PersonCategory
,Short
)
6245 Dim previousConnectionState
As Global.System
.Data
.ConnectionState
= Me.Adapter
.InsertCommand
.Connection
.State
6246 If ((Me.Adapter
.InsertCommand
.Connection
.State
And Global.System
.Data
.ConnectionState
.Open
) _
6247 <> Global.System
.Data
.ConnectionState
.Open
) Then
6248 Me.Adapter
.InsertCommand
.Connection
.Open
6251 Dim returnValue
As Integer = Me.Adapter
.InsertCommand
.ExecuteNonQuery
6254 If (previousConnectionState
= Global.System
.Data
.ConnectionState
.Closed
) Then
6255 Me.Adapter
.InsertCommand
.Connection
.Close
6260 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
6261 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter"), _
6262 Global.System
.ComponentModel
.DataObjectMethodAttribute(Global.System
.ComponentModel
.DataObjectMethodType
.Update
, true)> _
6263 Public Overloads Overridable
Function Update(ByVal LastName
As String, ByVal FirstName
As String, ByVal HireDate
As Global.System
.Nullable(Of
Date), ByVal EnrollmentDate
As Global.System
.Nullable(Of
Date), ByVal Picture() As Byte, ByVal PersonCategory
As Short
, ByVal Original_PersonID
As Integer, ByVal Original_LastName
As String, ByVal Original_FirstName
As String, ByVal Original_HireDate
As Global.System
.Nullable(Of
Date), ByVal Original_EnrollmentDate
As Global.System
.Nullable(Of
Date), ByVal Original_PersonCategory
As Short
, ByVal PersonID
As Integer) As Integer
6264 If (LastName Is
Nothing) Then
6265 Throw
New Global.System
.ArgumentNullException("LastName")
6267 Me.Adapter
.UpdateCommand
.Parameters(0).Value
= CType(LastName
,String)
6269 If (FirstName Is
Nothing) Then
6270 Throw
New Global.System
.ArgumentNullException("FirstName")
6272 Me.Adapter
.UpdateCommand
.Parameters(1).Value
= CType(FirstName
,String)
6274 If (HireDate
.HasValue
= true) Then
6275 Me.Adapter
.UpdateCommand
.Parameters(2).Value
= CType(HireDate
.Value
,Date)
6277 Me.Adapter
.UpdateCommand
.Parameters(2).Value
= Global.System
.DBNull
.Value
6279 If (EnrollmentDate
.HasValue
= true) Then
6280 Me.Adapter
.UpdateCommand
.Parameters(3).Value
= CType(EnrollmentDate
.Value
,Date)
6282 Me.Adapter
.UpdateCommand
.Parameters(3).Value
= Global.System
.DBNull
.Value
6284 If (Picture Is
Nothing) Then
6285 Me.Adapter
.UpdateCommand
.Parameters(4).Value
= Global.System
.DBNull
.Value
6287 Me.Adapter
.UpdateCommand
.Parameters(4).Value
= CType(Picture
,Byte())
6289 Me.Adapter
.UpdateCommand
.Parameters(5).Value
= CType(PersonCategory
,Short
)
6290 Me.Adapter
.UpdateCommand
.Parameters(6).Value
= CType(Original_PersonID
,Integer)
6291 If (Original_LastName Is
Nothing) Then
6292 Throw
New Global.System
.ArgumentNullException("Original_LastName")
6294 Me.Adapter
.UpdateCommand
.Parameters(7).Value
= CType(Original_LastName
,String)
6296 If (Original_FirstName Is
Nothing) Then
6297 Throw
New Global.System
.ArgumentNullException("Original_FirstName")
6299 Me.Adapter
.UpdateCommand
.Parameters(8).Value
= CType(Original_FirstName
,String)
6301 If (Original_HireDate
.HasValue
= true) Then
6302 Me.Adapter
.UpdateCommand
.Parameters(9).Value
= CType(0,Object)
6303 Me.Adapter
.UpdateCommand
.Parameters(10).Value
= CType(Original_HireDate
.Value
,Date)
6305 Me.Adapter
.UpdateCommand
.Parameters(9).Value
= CType(1,Object)
6306 Me.Adapter
.UpdateCommand
.Parameters(10).Value
= Global.System
.DBNull
.Value
6308 If (Original_EnrollmentDate
.HasValue
= true) Then
6309 Me.Adapter
.UpdateCommand
.Parameters(11).Value
= CType(0,Object)
6310 Me.Adapter
.UpdateCommand
.Parameters(12).Value
= CType(Original_EnrollmentDate
.Value
,Date)
6312 Me.Adapter
.UpdateCommand
.Parameters(11).Value
= CType(1,Object)
6313 Me.Adapter
.UpdateCommand
.Parameters(12).Value
= Global.System
.DBNull
.Value
6315 Me.Adapter
.UpdateCommand
.Parameters(13).Value
= CType(Original_PersonCategory
,Short
)
6316 Me.Adapter
.UpdateCommand
.Parameters(14).Value
= CType(PersonID
,Integer)
6317 Dim previousConnectionState
As Global.System
.Data
.ConnectionState
= Me.Adapter
.UpdateCommand
.Connection
.State
6318 If ((Me.Adapter
.UpdateCommand
.Connection
.State
And Global.System
.Data
.ConnectionState
.Open
) _
6319 <> Global.System
.Data
.ConnectionState
.Open
) Then
6320 Me.Adapter
.UpdateCommand
.Connection
.Open
6323 Dim returnValue
As Integer = Me.Adapter
.UpdateCommand
.ExecuteNonQuery
6326 If (previousConnectionState
= Global.System
.Data
.ConnectionState
.Closed
) Then
6327 Me.Adapter
.UpdateCommand
.Connection
.Close
6332 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
6333 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapter"), _
6334 Global.System
.ComponentModel
.DataObjectMethodAttribute(Global.System
.ComponentModel
.DataObjectMethodType
.Update
, true)> _
6335 Public Overloads Overridable
Function Update(ByVal LastName
As String, ByVal FirstName
As String, ByVal HireDate
As Global.System
.Nullable(Of
Date), ByVal EnrollmentDate
As Global.System
.Nullable(Of
Date), ByVal Picture() As Byte, ByVal PersonCategory
As Short
, ByVal Original_PersonID
As Integer, ByVal Original_LastName
As String, ByVal Original_FirstName
As String, ByVal Original_HireDate
As Global.System
.Nullable(Of
Date), ByVal Original_EnrollmentDate
As Global.System
.Nullable(Of
Date), ByVal Original_PersonCategory
As Short
) As Integer
6336 Return Me.Update(LastName
, FirstName
, HireDate
, EnrollmentDate
, Picture
, PersonCategory
, Original_PersonID
, Original_LastName
, Original_FirstName
, Original_HireDate
, Original_EnrollmentDate
, Original_PersonCategory
, Original_PersonID
)
6341 '''TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios
6343 <Global.System
.CodeDom
.Compiler
.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), _
6344 Global.System
.ComponentModel
.DesignerCategoryAttribute("code"), _
6345 Global.System
.ComponentModel
.ToolboxItem(true), _
6346 Global.System
.ComponentModel
.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerDesigner, Microsoft.VSD"& _
6347 "esigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), _
6348 Global.System
.ComponentModel
.Design
.HelpKeywordAttribute("vs.data.TableAdapterManager")> _
6349 Partial
Public Class TableAdapterManager
6350 Inherits
Global.System
.ComponentModel
.Component
6352 Private _updateOrder
As UpdateOrderOption
6354 Private _courseTableAdapter
As CourseTableAdapter
6356 Private _courseGradeTableAdapter
As CourseGradeTableAdapter
6358 Private _courseInstructorTableAdapter
As CourseInstructorTableAdapter
6360 Private _departmentTableAdapter
As DepartmentTableAdapter
6362 Private _officeAssignmentTableAdapter
As OfficeAssignmentTableAdapter
6364 Private _onlineCourseTableAdapter
As OnlineCourseTableAdapter
6366 Private _onsiteCourseTableAdapter
As OnsiteCourseTableAdapter
6368 Private _personTableAdapter
As PersonTableAdapter
6370 Private _backupDataSetBeforeUpdate
As Boolean
6372 Private _connection
As Global.System
.Data
.IDbConnection
6374 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
6375 Public Property UpdateOrder() As UpdateOrderOption
6377 Return Me._updateOrder
6380 Me._updateOrder
= value
6384 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
6385 Global.System
.ComponentModel
.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso"& _
6386 "ft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"& _
6387 "", "System.Drawing.Design.UITypeEditor")> _
6388 Public Property CourseTableAdapter() As CourseTableAdapter
6390 Return Me._courseTableAdapter
6393 Me._courseTableAdapter
= value
6397 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
6398 Global.System
.ComponentModel
.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso"& _
6399 "ft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"& _
6400 "", "System.Drawing.Design.UITypeEditor")> _
6401 Public Property CourseGradeTableAdapter() As CourseGradeTableAdapter
6403 Return Me._courseGradeTableAdapter
6406 Me._courseGradeTableAdapter
= value
6410 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
6411 Global.System
.ComponentModel
.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso"& _
6412 "ft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"& _
6413 "", "System.Drawing.Design.UITypeEditor")> _
6414 Public Property CourseInstructorTableAdapter() As CourseInstructorTableAdapter
6416 Return Me._courseInstructorTableAdapter
6419 Me._courseInstructorTableAdapter
= value
6423 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
6424 Global.System
.ComponentModel
.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso"& _
6425 "ft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"& _
6426 "", "System.Drawing.Design.UITypeEditor")> _
6427 Public Property DepartmentTableAdapter() As DepartmentTableAdapter
6429 Return Me._departmentTableAdapter
6432 Me._departmentTableAdapter
= value
6436 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
6437 Global.System
.ComponentModel
.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso"& _
6438 "ft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"& _
6439 "", "System.Drawing.Design.UITypeEditor")> _
6440 Public Property OfficeAssignmentTableAdapter() As OfficeAssignmentTableAdapter
6442 Return Me._officeAssignmentTableAdapter
6445 Me._officeAssignmentTableAdapter
= value
6449 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
6450 Global.System
.ComponentModel
.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso"& _
6451 "ft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"& _
6452 "", "System.Drawing.Design.UITypeEditor")> _
6453 Public Property OnlineCourseTableAdapter() As OnlineCourseTableAdapter
6455 Return Me._onlineCourseTableAdapter
6458 Me._onlineCourseTableAdapter
= value
6462 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
6463 Global.System
.ComponentModel
.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso"& _
6464 "ft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"& _
6465 "", "System.Drawing.Design.UITypeEditor")> _
6466 Public Property OnsiteCourseTableAdapter() As OnsiteCourseTableAdapter
6468 Return Me._onsiteCourseTableAdapter
6471 Me._onsiteCourseTableAdapter
= value
6475 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
6476 Global.System
.ComponentModel
.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso"& _
6477 "ft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"& _
6478 "", "System.Drawing.Design.UITypeEditor")> _
6479 Public Property PersonTableAdapter() As PersonTableAdapter
6481 Return Me._personTableAdapter
6484 Me._personTableAdapter
= value
6488 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
6489 Public Property BackupDataSetBeforeUpdate() As Boolean
6491 Return Me._backupDataSetBeforeUpdate
6494 Me._backupDataSetBeforeUpdate
= value
6498 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
6499 Global.System
.ComponentModel
.Browsable(false)> _
6500 Public Property Connection() As Global.System
.Data
.IDbConnection
6502 If (Not (Me._connection
) Is
Nothing) Then
6503 Return Me._connection
6505 If ((Not (Me._courseTableAdapter
) Is
Nothing) _
6506 AndAlso (Not (Me._courseTableAdapter
.Connection
) Is
Nothing)) Then
6507 Return Me._courseTableAdapter
.Connection
6509 If ((Not (Me._courseGradeTableAdapter
) Is
Nothing) _
6510 AndAlso (Not (Me._courseGradeTableAdapter
.Connection
) Is
Nothing)) Then
6511 Return Me._courseGradeTableAdapter
.Connection
6513 If ((Not (Me._courseInstructorTableAdapter
) Is
Nothing) _
6514 AndAlso (Not (Me._courseInstructorTableAdapter
.Connection
) Is
Nothing)) Then
6515 Return Me._courseInstructorTableAdapter
.Connection
6517 If ((Not (Me._departmentTableAdapter
) Is
Nothing) _
6518 AndAlso (Not (Me._departmentTableAdapter
.Connection
) Is
Nothing)) Then
6519 Return Me._departmentTableAdapter
.Connection
6521 If ((Not (Me._officeAssignmentTableAdapter
) Is
Nothing) _
6522 AndAlso (Not (Me._officeAssignmentTableAdapter
.Connection
) Is
Nothing)) Then
6523 Return Me._officeAssignmentTableAdapter
.Connection
6525 If ((Not (Me._onlineCourseTableAdapter
) Is
Nothing) _
6526 AndAlso (Not (Me._onlineCourseTableAdapter
.Connection
) Is
Nothing)) Then
6527 Return Me._onlineCourseTableAdapter
.Connection
6529 If ((Not (Me._onsiteCourseTableAdapter
) Is
Nothing) _
6530 AndAlso (Not (Me._onsiteCourseTableAdapter
.Connection
) Is
Nothing)) Then
6531 Return Me._onsiteCourseTableAdapter
.Connection
6533 If ((Not (Me._personTableAdapter
) Is
Nothing) _
6534 AndAlso (Not (Me._personTableAdapter
.Connection
) Is
Nothing)) Then
6535 Return Me._personTableAdapter
.Connection
6540 Me._connection
= value
6544 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute(), _
6545 Global.System
.ComponentModel
.Browsable(false)> _
6546 Public ReadOnly
Property TableAdapterInstanceCount() As Integer
6548 Dim count
As Integer = 0
6549 If (Not (Me._courseTableAdapter
) Is
Nothing) Then
6552 If (Not (Me._courseGradeTableAdapter
) Is
Nothing) Then
6555 If (Not (Me._courseInstructorTableAdapter
) Is
Nothing) Then
6558 If (Not (Me._departmentTableAdapter
) Is
Nothing) Then
6561 If (Not (Me._officeAssignmentTableAdapter
) Is
Nothing) Then
6564 If (Not (Me._onlineCourseTableAdapter
) Is
Nothing) Then
6567 If (Not (Me._onsiteCourseTableAdapter
) Is
Nothing) Then
6570 If (Not (Me._personTableAdapter
) Is
Nothing) Then
6578 '''Update rows in top-down order.
6580 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
6581 Private Function UpdateUpdatedRows(ByVal dataSet
As SQLServer2005DBDataSet
, ByVal allChangedRows
As Global.System
.Collections
.Generic
.List(Of
Global.System
.Data
.DataRow
), ByVal allAddedRows
As Global.System
.Collections
.Generic
.List(Of
Global.System
.Data
.DataRow
)) As Integer
6582 Dim result
As Integer = 0
6583 If (Not (Me._departmentTableAdapter
) Is
Nothing) Then
6584 Dim updatedRows() As Global.System
.Data
.DataRow
= dataSet
.Department
.Select(Nothing, Nothing, Global.System
.Data
.DataViewRowState
.ModifiedCurrent
)
6585 updatedRows
= Me.GetRealUpdatedRows(updatedRows
, allAddedRows
)
6586 If ((Not (updatedRows
) Is
Nothing) _
6587 AndAlso (0 < updatedRows
.Length
)) Then
6588 result
= (result
+ Me._departmentTableAdapter
.Update(updatedRows
))
6589 allChangedRows
.AddRange(updatedRows
)
6592 If (Not (Me._courseTableAdapter
) Is
Nothing) Then
6593 Dim updatedRows() As Global.System
.Data
.DataRow
= dataSet
.Course
.Select(Nothing, Nothing, Global.System
.Data
.DataViewRowState
.ModifiedCurrent
)
6594 updatedRows
= Me.GetRealUpdatedRows(updatedRows
, allAddedRows
)
6595 If ((Not (updatedRows
) Is
Nothing) _
6596 AndAlso (0 < updatedRows
.Length
)) Then
6597 result
= (result
+ Me._courseTableAdapter
.Update(updatedRows
))
6598 allChangedRows
.AddRange(updatedRows
)
6601 If (Not (Me._personTableAdapter
) Is
Nothing) Then
6602 Dim updatedRows() As Global.System
.Data
.DataRow
= dataSet
.Person
.Select(Nothing, Nothing, Global.System
.Data
.DataViewRowState
.ModifiedCurrent
)
6603 updatedRows
= Me.GetRealUpdatedRows(updatedRows
, allAddedRows
)
6604 If ((Not (updatedRows
) Is
Nothing) _
6605 AndAlso (0 < updatedRows
.Length
)) Then
6606 result
= (result
+ Me._personTableAdapter
.Update(updatedRows
))
6607 allChangedRows
.AddRange(updatedRows
)
6610 If (Not (Me._onsiteCourseTableAdapter
) Is
Nothing) Then
6611 Dim updatedRows() As Global.System
.Data
.DataRow
= dataSet
.OnsiteCourse
.Select(Nothing, Nothing, Global.System
.Data
.DataViewRowState
.ModifiedCurrent
)
6612 updatedRows
= Me.GetRealUpdatedRows(updatedRows
, allAddedRows
)
6613 If ((Not (updatedRows
) Is
Nothing) _
6614 AndAlso (0 < updatedRows
.Length
)) Then
6615 result
= (result
+ Me._onsiteCourseTableAdapter
.Update(updatedRows
))
6616 allChangedRows
.AddRange(updatedRows
)
6619 If (Not (Me._courseGradeTableAdapter
) Is
Nothing) Then
6620 Dim updatedRows() As Global.System
.Data
.DataRow
= dataSet
.CourseGrade
.Select(Nothing, Nothing, Global.System
.Data
.DataViewRowState
.ModifiedCurrent
)
6621 updatedRows
= Me.GetRealUpdatedRows(updatedRows
, allAddedRows
)
6622 If ((Not (updatedRows
) Is
Nothing) _
6623 AndAlso (0 < updatedRows
.Length
)) Then
6624 result
= (result
+ Me._courseGradeTableAdapter
.Update(updatedRows
))
6625 allChangedRows
.AddRange(updatedRows
)
6628 If (Not (Me._onlineCourseTableAdapter
) Is
Nothing) Then
6629 Dim updatedRows() As Global.System
.Data
.DataRow
= dataSet
.OnlineCourse
.Select(Nothing, Nothing, Global.System
.Data
.DataViewRowState
.ModifiedCurrent
)
6630 updatedRows
= Me.GetRealUpdatedRows(updatedRows
, allAddedRows
)
6631 If ((Not (updatedRows
) Is
Nothing) _
6632 AndAlso (0 < updatedRows
.Length
)) Then
6633 result
= (result
+ Me._onlineCourseTableAdapter
.Update(updatedRows
))
6634 allChangedRows
.AddRange(updatedRows
)
6637 If (Not (Me._courseInstructorTableAdapter
) Is
Nothing) Then
6638 Dim updatedRows() As Global.System
.Data
.DataRow
= dataSet
.CourseInstructor
.Select(Nothing, Nothing, Global.System
.Data
.DataViewRowState
.ModifiedCurrent
)
6639 updatedRows
= Me.GetRealUpdatedRows(updatedRows
, allAddedRows
)
6640 If ((Not (updatedRows
) Is
Nothing) _
6641 AndAlso (0 < updatedRows
.Length
)) Then
6642 result
= (result
+ Me._courseInstructorTableAdapter
.Update(updatedRows
))
6643 allChangedRows
.AddRange(updatedRows
)
6646 If (Not (Me._officeAssignmentTableAdapter
) Is
Nothing) Then
6647 Dim updatedRows() As Global.System
.Data
.DataRow
= dataSet
.OfficeAssignment
.Select(Nothing, Nothing, Global.System
.Data
.DataViewRowState
.ModifiedCurrent
)
6648 updatedRows
= Me.GetRealUpdatedRows(updatedRows
, allAddedRows
)
6649 If ((Not (updatedRows
) Is
Nothing) _
6650 AndAlso (0 < updatedRows
.Length
)) Then
6651 result
= (result
+ Me._officeAssignmentTableAdapter
.Update(updatedRows
))
6652 allChangedRows
.AddRange(updatedRows
)
6659 '''Insert rows in top-down order.
6661 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
6662 Private Function UpdateInsertedRows(ByVal dataSet
As SQLServer2005DBDataSet
, ByVal allAddedRows
As Global.System
.Collections
.Generic
.List(Of
Global.System
.Data
.DataRow
)) As Integer
6663 Dim result
As Integer = 0
6664 If (Not (Me._departmentTableAdapter
) Is
Nothing) Then
6665 Dim addedRows() As Global.System
.Data
.DataRow
= dataSet
.Department
.Select(Nothing, Nothing, Global.System
.Data
.DataViewRowState
.Added
)
6666 If ((Not (addedRows
) Is
Nothing) _
6667 AndAlso (0 < addedRows
.Length
)) Then
6668 result
= (result
+ Me._departmentTableAdapter
.Update(addedRows
))
6669 allAddedRows
.AddRange(addedRows
)
6672 If (Not (Me._courseTableAdapter
) Is
Nothing) Then
6673 Dim addedRows() As Global.System
.Data
.DataRow
= dataSet
.Course
.Select(Nothing, Nothing, Global.System
.Data
.DataViewRowState
.Added
)
6674 If ((Not (addedRows
) Is
Nothing) _
6675 AndAlso (0 < addedRows
.Length
)) Then
6676 result
= (result
+ Me._courseTableAdapter
.Update(addedRows
))
6677 allAddedRows
.AddRange(addedRows
)
6680 If (Not (Me._personTableAdapter
) Is
Nothing) Then
6681 Dim addedRows() As Global.System
.Data
.DataRow
= dataSet
.Person
.Select(Nothing, Nothing, Global.System
.Data
.DataViewRowState
.Added
)
6682 If ((Not (addedRows
) Is
Nothing) _
6683 AndAlso (0 < addedRows
.Length
)) Then
6684 result
= (result
+ Me._personTableAdapter
.Update(addedRows
))
6685 allAddedRows
.AddRange(addedRows
)
6688 If (Not (Me._onsiteCourseTableAdapter
) Is
Nothing) Then
6689 Dim addedRows() As Global.System
.Data
.DataRow
= dataSet
.OnsiteCourse
.Select(Nothing, Nothing, Global.System
.Data
.DataViewRowState
.Added
)
6690 If ((Not (addedRows
) Is
Nothing) _
6691 AndAlso (0 < addedRows
.Length
)) Then
6692 result
= (result
+ Me._onsiteCourseTableAdapter
.Update(addedRows
))
6693 allAddedRows
.AddRange(addedRows
)
6696 If (Not (Me._courseGradeTableAdapter
) Is
Nothing) Then
6697 Dim addedRows() As Global.System
.Data
.DataRow
= dataSet
.CourseGrade
.Select(Nothing, Nothing, Global.System
.Data
.DataViewRowState
.Added
)
6698 If ((Not (addedRows
) Is
Nothing) _
6699 AndAlso (0 < addedRows
.Length
)) Then
6700 result
= (result
+ Me._courseGradeTableAdapter
.Update(addedRows
))
6701 allAddedRows
.AddRange(addedRows
)
6704 If (Not (Me._onlineCourseTableAdapter
) Is
Nothing) Then
6705 Dim addedRows() As Global.System
.Data
.DataRow
= dataSet
.OnlineCourse
.Select(Nothing, Nothing, Global.System
.Data
.DataViewRowState
.Added
)
6706 If ((Not (addedRows
) Is
Nothing) _
6707 AndAlso (0 < addedRows
.Length
)) Then
6708 result
= (result
+ Me._onlineCourseTableAdapter
.Update(addedRows
))
6709 allAddedRows
.AddRange(addedRows
)
6712 If (Not (Me._courseInstructorTableAdapter
) Is
Nothing) Then
6713 Dim addedRows() As Global.System
.Data
.DataRow
= dataSet
.CourseInstructor
.Select(Nothing, Nothing, Global.System
.Data
.DataViewRowState
.Added
)
6714 If ((Not (addedRows
) Is
Nothing) _
6715 AndAlso (0 < addedRows
.Length
)) Then
6716 result
= (result
+ Me._courseInstructorTableAdapter
.Update(addedRows
))
6717 allAddedRows
.AddRange(addedRows
)
6720 If (Not (Me._officeAssignmentTableAdapter
) Is
Nothing) Then
6721 Dim addedRows() As Global.System
.Data
.DataRow
= dataSet
.OfficeAssignment
.Select(Nothing, Nothing, Global.System
.Data
.DataViewRowState
.Added
)
6722 If ((Not (addedRows
) Is
Nothing) _
6723 AndAlso (0 < addedRows
.Length
)) Then
6724 result
= (result
+ Me._officeAssignmentTableAdapter
.Update(addedRows
))
6725 allAddedRows
.AddRange(addedRows
)
6732 '''Delete rows in bottom-up order.
6734 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
6735 Private Function UpdateDeletedRows(ByVal dataSet
As SQLServer2005DBDataSet
, ByVal allChangedRows
As Global.System
.Collections
.Generic
.List(Of
Global.System
.Data
.DataRow
)) As Integer
6736 Dim result
As Integer = 0
6737 If (Not (Me._officeAssignmentTableAdapter
) Is
Nothing) Then
6738 Dim deletedRows() As Global.System
.Data
.DataRow
= dataSet
.OfficeAssignment
.Select(Nothing, Nothing, Global.System
.Data
.DataViewRowState
.Deleted
)
6739 If ((Not (deletedRows
) Is
Nothing) _
6740 AndAlso (0 < deletedRows
.Length
)) Then
6741 result
= (result
+ Me._officeAssignmentTableAdapter
.Update(deletedRows
))
6742 allChangedRows
.AddRange(deletedRows
)
6745 If (Not (Me._courseInstructorTableAdapter
) Is
Nothing) Then
6746 Dim deletedRows() As Global.System
.Data
.DataRow
= dataSet
.CourseInstructor
.Select(Nothing, Nothing, Global.System
.Data
.DataViewRowState
.Deleted
)
6747 If ((Not (deletedRows
) Is
Nothing) _
6748 AndAlso (0 < deletedRows
.Length
)) Then
6749 result
= (result
+ Me._courseInstructorTableAdapter
.Update(deletedRows
))
6750 allChangedRows
.AddRange(deletedRows
)
6753 If (Not (Me._onlineCourseTableAdapter
) Is
Nothing) Then
6754 Dim deletedRows() As Global.System
.Data
.DataRow
= dataSet
.OnlineCourse
.Select(Nothing, Nothing, Global.System
.Data
.DataViewRowState
.Deleted
)
6755 If ((Not (deletedRows
) Is
Nothing) _
6756 AndAlso (0 < deletedRows
.Length
)) Then
6757 result
= (result
+ Me._onlineCourseTableAdapter
.Update(deletedRows
))
6758 allChangedRows
.AddRange(deletedRows
)
6761 If (Not (Me._courseGradeTableAdapter
) Is
Nothing) Then
6762 Dim deletedRows() As Global.System
.Data
.DataRow
= dataSet
.CourseGrade
.Select(Nothing, Nothing, Global.System
.Data
.DataViewRowState
.Deleted
)
6763 If ((Not (deletedRows
) Is
Nothing) _
6764 AndAlso (0 < deletedRows
.Length
)) Then
6765 result
= (result
+ Me._courseGradeTableAdapter
.Update(deletedRows
))
6766 allChangedRows
.AddRange(deletedRows
)
6769 If (Not (Me._onsiteCourseTableAdapter
) Is
Nothing) Then
6770 Dim deletedRows() As Global.System
.Data
.DataRow
= dataSet
.OnsiteCourse
.Select(Nothing, Nothing, Global.System
.Data
.DataViewRowState
.Deleted
)
6771 If ((Not (deletedRows
) Is
Nothing) _
6772 AndAlso (0 < deletedRows
.Length
)) Then
6773 result
= (result
+ Me._onsiteCourseTableAdapter
.Update(deletedRows
))
6774 allChangedRows
.AddRange(deletedRows
)
6777 If (Not (Me._personTableAdapter
) Is
Nothing) Then
6778 Dim deletedRows() As Global.System
.Data
.DataRow
= dataSet
.Person
.Select(Nothing, Nothing, Global.System
.Data
.DataViewRowState
.Deleted
)
6779 If ((Not (deletedRows
) Is
Nothing) _
6780 AndAlso (0 < deletedRows
.Length
)) Then
6781 result
= (result
+ Me._personTableAdapter
.Update(deletedRows
))
6782 allChangedRows
.AddRange(deletedRows
)
6785 If (Not (Me._courseTableAdapter
) Is
Nothing) Then
6786 Dim deletedRows() As Global.System
.Data
.DataRow
= dataSet
.Course
.Select(Nothing, Nothing, Global.System
.Data
.DataViewRowState
.Deleted
)
6787 If ((Not (deletedRows
) Is
Nothing) _
6788 AndAlso (0 < deletedRows
.Length
)) Then
6789 result
= (result
+ Me._courseTableAdapter
.Update(deletedRows
))
6790 allChangedRows
.AddRange(deletedRows
)
6793 If (Not (Me._departmentTableAdapter
) Is
Nothing) Then
6794 Dim deletedRows() As Global.System
.Data
.DataRow
= dataSet
.Department
.Select(Nothing, Nothing, Global.System
.Data
.DataViewRowState
.Deleted
)
6795 If ((Not (deletedRows
) Is
Nothing) _
6796 AndAlso (0 < deletedRows
.Length
)) Then
6797 result
= (result
+ Me._departmentTableAdapter
.Update(deletedRows
))
6798 allChangedRows
.AddRange(deletedRows
)
6805 '''Remove inserted rows that become updated rows after calling TableAdapter.Update(inserted rows) first
6807 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
6808 Private Function GetRealUpdatedRows(ByVal updatedRows() As Global.System
.Data
.DataRow
, ByVal allAddedRows
As Global.System
.Collections
.Generic
.List(Of
Global.System
.Data
.DataRow
)) As Global.System
.Data
.DataRow()
6809 If ((updatedRows Is
Nothing) _
6810 OrElse (updatedRows
.Length
< 1)) Then
6813 If ((allAddedRows Is
Nothing) _
6814 OrElse (allAddedRows
.Count
< 1)) Then
6817 Dim realUpdatedRows
As Global.System
.Collections
.Generic
.List(Of
Global.System
.Data
.DataRow
) = New Global.System
.Collections
.Generic
.List(Of
Global.System
.Data
.DataRow
)
6818 Dim i
As Integer = 0
6819 Do While (i
< updatedRows
.Length
)
6820 Dim row
As Global.System
.Data
.DataRow
= updatedRows(i
)
6821 If (allAddedRows
.Contains(row
) = false) Then
6822 realUpdatedRows
.Add(row
)
6826 Return realUpdatedRows
.ToArray
6830 '''Update all changes to the dataset.
6832 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
6833 Public Overridable
Function UpdateAll(ByVal dataSet
As SQLServer2005DBDataSet
) As Integer
6834 If (dataSet Is
Nothing) Then
6835 Throw
New Global.System
.ArgumentNullException("dataSet")
6837 If (dataSet
.HasChanges
= false) Then
6840 If ((Not (Me._courseTableAdapter
) Is
Nothing) _
6841 AndAlso (Me.MatchTableAdapterConnection(Me._courseTableAdapter
.Connection
) = false)) Then
6842 Throw
New Global.System
.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _
6845 If ((Not (Me._courseGradeTableAdapter
) Is
Nothing) _
6846 AndAlso (Me.MatchTableAdapterConnection(Me._courseGradeTableAdapter
.Connection
) = false)) Then
6847 Throw
New Global.System
.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _
6850 If ((Not (Me._courseInstructorTableAdapter
) Is
Nothing) _
6851 AndAlso (Me.MatchTableAdapterConnection(Me._courseInstructorTableAdapter
.Connection
) = false)) Then
6852 Throw
New Global.System
.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _
6855 If ((Not (Me._departmentTableAdapter
) Is
Nothing) _
6856 AndAlso (Me.MatchTableAdapterConnection(Me._departmentTableAdapter
.Connection
) = false)) Then
6857 Throw
New Global.System
.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _
6860 If ((Not (Me._officeAssignmentTableAdapter
) Is
Nothing) _
6861 AndAlso (Me.MatchTableAdapterConnection(Me._officeAssignmentTableAdapter
.Connection
) = false)) Then
6862 Throw
New Global.System
.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _
6865 If ((Not (Me._onlineCourseTableAdapter
) Is
Nothing) _
6866 AndAlso (Me.MatchTableAdapterConnection(Me._onlineCourseTableAdapter
.Connection
) = false)) Then
6867 Throw
New Global.System
.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _
6870 If ((Not (Me._onsiteCourseTableAdapter
) Is
Nothing) _
6871 AndAlso (Me.MatchTableAdapterConnection(Me._onsiteCourseTableAdapter
.Connection
) = false)) Then
6872 Throw
New Global.System
.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _
6875 If ((Not (Me._personTableAdapter
) Is
Nothing) _
6876 AndAlso (Me.MatchTableAdapterConnection(Me._personTableAdapter
.Connection
) = false)) Then
6877 Throw
New Global.System
.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s"& _
6880 Dim workConnection
As Global.System
.Data
.IDbConnection
= Me.Connection
6881 If (workConnection Is
Nothing) Then
6882 Throw
New Global.System
.ApplicationException("TableAdapterManager contains no connection information. Set each TableAdapterMana"& _
6883 "ger TableAdapter property to a valid TableAdapter instance.")
6885 Dim workConnOpened
As Boolean = false
6886 If ((workConnection
.State
And Global.System
.Data
.ConnectionState
.Broken
) _
6887 = Global.System
.Data
.ConnectionState
.Broken
) Then
6888 workConnection
.Close
6890 If (workConnection
.State
= Global.System
.Data
.ConnectionState
.Closed
) Then
6892 workConnOpened
= true
6894 Dim workTransaction
As Global.System
.Data
.IDbTransaction
= workConnection
.BeginTransaction
6895 If (workTransaction Is
Nothing) Then
6896 Throw
New Global.System
.ApplicationException("The transaction cannot begin. The current data connection does not support transa"& _
6897 "ctions or the current state is not allowing the transaction to begin.")
6899 Dim allChangedRows
As Global.System
.Collections
.Generic
.List(Of
Global.System
.Data
.DataRow
) = New Global.System
.Collections
.Generic
.List(Of
Global.System
.Data
.DataRow
)
6900 Dim allAddedRows
As Global.System
.Collections
.Generic
.List(Of
Global.System
.Data
.DataRow
) = New Global.System
.Collections
.Generic
.List(Of
Global.System
.Data
.DataRow
)
6901 Dim adaptersWithAcceptChangesDuringUpdate
As Global.System
.Collections
.Generic
.List(Of
Global.System
.Data
.Common
.DataAdapter
) = New Global.System
.Collections
.Generic
.List(Of
Global.System
.Data
.Common
.DataAdapter
)
6902 Dim revertConnections
As Global.System
.Collections
.Generic
.Dictionary(Of
Object, Global.System
.Data
.IDbConnection
) = New Global.System
.Collections
.Generic
.Dictionary(Of
Object, Global.System
.Data
.IDbConnection
)
6903 Dim result
As Integer = 0
6904 Dim backupDataSet
As Global.System
.Data
.DataSet
= Nothing
6905 If Me.BackupDataSetBeforeUpdate
Then
6906 backupDataSet
= New Global.System
.Data
.DataSet
6907 backupDataSet
.Merge(dataSet
)
6910 '---- Prepare for update -----------
6912 If (Not (Me._courseTableAdapter
) Is
Nothing) Then
6913 revertConnections
.Add(Me._courseTableAdapter
, Me._courseTableAdapter
.Connection
)
6914 Me._courseTableAdapter
.Connection
= CType(workConnection
,Global.System
.Data
.SqlClient
.SqlConnection
)
6915 Me._courseTableAdapter
.Transaction
= CType(workTransaction
,Global.System
.Data
.SqlClient
.SqlTransaction
)
6916 If Me._courseTableAdapter
.Adapter
.AcceptChangesDuringUpdate
Then
6917 Me._courseTableAdapter
.Adapter
.AcceptChangesDuringUpdate
= false
6918 adaptersWithAcceptChangesDuringUpdate
.Add(Me._courseTableAdapter
.Adapter
)
6921 If (Not (Me._courseGradeTableAdapter
) Is
Nothing) Then
6922 revertConnections
.Add(Me._courseGradeTableAdapter
, Me._courseGradeTableAdapter
.Connection
)
6923 Me._courseGradeTableAdapter
.Connection
= CType(workConnection
,Global.System
.Data
.SqlClient
.SqlConnection
)
6924 Me._courseGradeTableAdapter
.Transaction
= CType(workTransaction
,Global.System
.Data
.SqlClient
.SqlTransaction
)
6925 If Me._courseGradeTableAdapter
.Adapter
.AcceptChangesDuringUpdate
Then
6926 Me._courseGradeTableAdapter
.Adapter
.AcceptChangesDuringUpdate
= false
6927 adaptersWithAcceptChangesDuringUpdate
.Add(Me._courseGradeTableAdapter
.Adapter
)
6930 If (Not (Me._courseInstructorTableAdapter
) Is
Nothing) Then
6931 revertConnections
.Add(Me._courseInstructorTableAdapter
, Me._courseInstructorTableAdapter
.Connection
)
6932 Me._courseInstructorTableAdapter
.Connection
= CType(workConnection
,Global.System
.Data
.SqlClient
.SqlConnection
)
6933 Me._courseInstructorTableAdapter
.Transaction
= CType(workTransaction
,Global.System
.Data
.SqlClient
.SqlTransaction
)
6934 If Me._courseInstructorTableAdapter
.Adapter
.AcceptChangesDuringUpdate
Then
6935 Me._courseInstructorTableAdapter
.Adapter
.AcceptChangesDuringUpdate
= false
6936 adaptersWithAcceptChangesDuringUpdate
.Add(Me._courseInstructorTableAdapter
.Adapter
)
6939 If (Not (Me._departmentTableAdapter
) Is
Nothing) Then
6940 revertConnections
.Add(Me._departmentTableAdapter
, Me._departmentTableAdapter
.Connection
)
6941 Me._departmentTableAdapter
.Connection
= CType(workConnection
,Global.System
.Data
.SqlClient
.SqlConnection
)
6942 Me._departmentTableAdapter
.Transaction
= CType(workTransaction
,Global.System
.Data
.SqlClient
.SqlTransaction
)
6943 If Me._departmentTableAdapter
.Adapter
.AcceptChangesDuringUpdate
Then
6944 Me._departmentTableAdapter
.Adapter
.AcceptChangesDuringUpdate
= false
6945 adaptersWithAcceptChangesDuringUpdate
.Add(Me._departmentTableAdapter
.Adapter
)
6948 If (Not (Me._officeAssignmentTableAdapter
) Is
Nothing) Then
6949 revertConnections
.Add(Me._officeAssignmentTableAdapter
, Me._officeAssignmentTableAdapter
.Connection
)
6950 Me._officeAssignmentTableAdapter
.Connection
= CType(workConnection
,Global.System
.Data
.SqlClient
.SqlConnection
)
6951 Me._officeAssignmentTableAdapter
.Transaction
= CType(workTransaction
,Global.System
.Data
.SqlClient
.SqlTransaction
)
6952 If Me._officeAssignmentTableAdapter
.Adapter
.AcceptChangesDuringUpdate
Then
6953 Me._officeAssignmentTableAdapter
.Adapter
.AcceptChangesDuringUpdate
= false
6954 adaptersWithAcceptChangesDuringUpdate
.Add(Me._officeAssignmentTableAdapter
.Adapter
)
6957 If (Not (Me._onlineCourseTableAdapter
) Is
Nothing) Then
6958 revertConnections
.Add(Me._onlineCourseTableAdapter
, Me._onlineCourseTableAdapter
.Connection
)
6959 Me._onlineCourseTableAdapter
.Connection
= CType(workConnection
,Global.System
.Data
.SqlClient
.SqlConnection
)
6960 Me._onlineCourseTableAdapter
.Transaction
= CType(workTransaction
,Global.System
.Data
.SqlClient
.SqlTransaction
)
6961 If Me._onlineCourseTableAdapter
.Adapter
.AcceptChangesDuringUpdate
Then
6962 Me._onlineCourseTableAdapter
.Adapter
.AcceptChangesDuringUpdate
= false
6963 adaptersWithAcceptChangesDuringUpdate
.Add(Me._onlineCourseTableAdapter
.Adapter
)
6966 If (Not (Me._onsiteCourseTableAdapter
) Is
Nothing) Then
6967 revertConnections
.Add(Me._onsiteCourseTableAdapter
, Me._onsiteCourseTableAdapter
.Connection
)
6968 Me._onsiteCourseTableAdapter
.Connection
= CType(workConnection
,Global.System
.Data
.SqlClient
.SqlConnection
)
6969 Me._onsiteCourseTableAdapter
.Transaction
= CType(workTransaction
,Global.System
.Data
.SqlClient
.SqlTransaction
)
6970 If Me._onsiteCourseTableAdapter
.Adapter
.AcceptChangesDuringUpdate
Then
6971 Me._onsiteCourseTableAdapter
.Adapter
.AcceptChangesDuringUpdate
= false
6972 adaptersWithAcceptChangesDuringUpdate
.Add(Me._onsiteCourseTableAdapter
.Adapter
)
6975 If (Not (Me._personTableAdapter
) Is
Nothing) Then
6976 revertConnections
.Add(Me._personTableAdapter
, Me._personTableAdapter
.Connection
)
6977 Me._personTableAdapter
.Connection
= CType(workConnection
,Global.System
.Data
.SqlClient
.SqlConnection
)
6978 Me._personTableAdapter
.Transaction
= CType(workTransaction
,Global.System
.Data
.SqlClient
.SqlTransaction
)
6979 If Me._personTableAdapter
.Adapter
.AcceptChangesDuringUpdate
Then
6980 Me._personTableAdapter
.Adapter
.AcceptChangesDuringUpdate
= false
6981 adaptersWithAcceptChangesDuringUpdate
.Add(Me._personTableAdapter
.Adapter
)
6985 '---- Perform updates -----------
6987 If (Me.UpdateOrder
= UpdateOrderOption
.UpdateInsertDelete
) Then
6988 result
= (result
+ Me.UpdateUpdatedRows(dataSet
, allChangedRows
, allAddedRows
))
6989 result
= (result
+ Me.UpdateInsertedRows(dataSet
, allAddedRows
))
6991 result
= (result
+ Me.UpdateInsertedRows(dataSet
, allAddedRows
))
6992 result
= (result
+ Me.UpdateUpdatedRows(dataSet
, allChangedRows
, allAddedRows
))
6994 result
= (result
+ Me.UpdateDeletedRows(dataSet
, allChangedRows
))
6996 '---- Commit updates -----------
6998 workTransaction
.Commit
6999 If (0 < allAddedRows
.Count
) Then
7000 Dim rows((allAddedRows
.Count
) - 1) As Global.System
.Data
.DataRow
7001 allAddedRows
.CopyTo(rows
)
7002 Dim i
As Integer = 0
7003 Do While (i
< rows
.Length
)
7004 Dim row
As Global.System
.Data
.DataRow
= rows(i
)
7009 If (0 < allChangedRows
.Count
) Then
7010 Dim rows((allChangedRows
.Count
) - 1) As Global.System
.Data
.DataRow
7011 allChangedRows
.CopyTo(rows
)
7012 Dim i
As Integer = 0
7013 Do While (i
< rows
.Length
)
7014 Dim row
As Global.System
.Data
.DataRow
= rows(i
)
7019 Catch ex
As Global.System
.Exception
7020 workTransaction
.Rollback
7021 '---- Restore the dataset -----------
7022 If Me.BackupDataSetBeforeUpdate
Then
7023 Global.System
.Diagnostics
.Debug
.Assert((Not (backupDataSet
) Is
Nothing))
7025 dataSet
.Merge(backupDataSet
)
7027 If (0 < allAddedRows
.Count
) Then
7028 Dim rows((allAddedRows
.Count
) - 1) As Global.System
.Data
.DataRow
7029 allAddedRows
.CopyTo(rows
)
7030 Dim i
As Integer = 0
7031 Do While (i
< rows
.Length
)
7032 Dim row
As Global.System
.Data
.DataRow
= rows(i
)
7041 If workConnOpened
Then
7042 workConnection
.Close
7044 If (Not (Me._courseTableAdapter
) Is
Nothing) Then
7045 Me._courseTableAdapter
.Connection
= CType(revertConnections(Me._courseTableAdapter
),Global.System
.Data
.SqlClient
.SqlConnection
)
7046 Me._courseTableAdapter
.Transaction
= Nothing
7048 If (Not (Me._courseGradeTableAdapter
) Is
Nothing) Then
7049 Me._courseGradeTableAdapter
.Connection
= CType(revertConnections(Me._courseGradeTableAdapter
),Global.System
.Data
.SqlClient
.SqlConnection
)
7050 Me._courseGradeTableAdapter
.Transaction
= Nothing
7052 If (Not (Me._courseInstructorTableAdapter
) Is
Nothing) Then
7053 Me._courseInstructorTableAdapter
.Connection
= CType(revertConnections(Me._courseInstructorTableAdapter
),Global.System
.Data
.SqlClient
.SqlConnection
)
7054 Me._courseInstructorTableAdapter
.Transaction
= Nothing
7056 If (Not (Me._departmentTableAdapter
) Is
Nothing) Then
7057 Me._departmentTableAdapter
.Connection
= CType(revertConnections(Me._departmentTableAdapter
),Global.System
.Data
.SqlClient
.SqlConnection
)
7058 Me._departmentTableAdapter
.Transaction
= Nothing
7060 If (Not (Me._officeAssignmentTableAdapter
) Is
Nothing) Then
7061 Me._officeAssignmentTableAdapter
.Connection
= CType(revertConnections(Me._officeAssignmentTableAdapter
),Global.System
.Data
.SqlClient
.SqlConnection
)
7062 Me._officeAssignmentTableAdapter
.Transaction
= Nothing
7064 If (Not (Me._onlineCourseTableAdapter
) Is
Nothing) Then
7065 Me._onlineCourseTableAdapter
.Connection
= CType(revertConnections(Me._onlineCourseTableAdapter
),Global.System
.Data
.SqlClient
.SqlConnection
)
7066 Me._onlineCourseTableAdapter
.Transaction
= Nothing
7068 If (Not (Me._onsiteCourseTableAdapter
) Is
Nothing) Then
7069 Me._onsiteCourseTableAdapter
.Connection
= CType(revertConnections(Me._onsiteCourseTableAdapter
),Global.System
.Data
.SqlClient
.SqlConnection
)
7070 Me._onsiteCourseTableAdapter
.Transaction
= Nothing
7072 If (Not (Me._personTableAdapter
) Is
Nothing) Then
7073 Me._personTableAdapter
.Connection
= CType(revertConnections(Me._personTableAdapter
),Global.System
.Data
.SqlClient
.SqlConnection
)
7074 Me._personTableAdapter
.Transaction
= Nothing
7076 If (0 < adaptersWithAcceptChangesDuringUpdate
.Count
) Then
7077 Dim adapters((adaptersWithAcceptChangesDuringUpdate
.Count
) - 1) As Global.System
.Data
.Common
.DataAdapter
7078 adaptersWithAcceptChangesDuringUpdate
.CopyTo(adapters
)
7079 Dim i
As Integer = 0
7080 Do While (i
< adapters
.Length
)
7081 Dim adapter
As Global.System
.Data
.Common
.DataAdapter
= adapters(i
)
7082 adapter
.AcceptChangesDuringUpdate
= true
7090 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
7091 Protected Overridable
Sub SortSelfReferenceRows(ByVal rows() As Global.System
.Data
.DataRow
, ByVal relation
As Global.System
.Data
.DataRelation
, ByVal childFirst
As Boolean)
7092 Global.System
.Array
.Sort(Of
Global.System
.Data
.DataRow
)(rows
, New SelfReferenceComparer(relation
, childFirst
))
7095 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
7096 Protected Overridable
Function MatchTableAdapterConnection(ByVal inputConnection
As Global.System
.Data
.IDbConnection
) As Boolean
7097 If (Not (Me._connection
) Is
Nothing) Then
7100 If ((Me.Connection Is
Nothing) _
7101 OrElse (inputConnection Is
Nothing)) Then
7104 If String.Equals(Me.Connection
.ConnectionString
, inputConnection
.ConnectionString
, Global.System
.StringComparison
.Ordinal
) Then
7111 '''Update Order Option
7113 <Global.System
.CodeDom
.Compiler
.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
7114 Public Enum UpdateOrderOption
7116 InsertUpdateDelete
= 0
7118 UpdateInsertDelete
= 1
7122 '''Used to sort self-referenced table's rows
7124 <Global.System
.CodeDom
.Compiler
.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")> _
7125 Private Class SelfReferenceComparer
7127 Implements
Global.System
.Collections
.Generic
.IComparer(Of
Global.System
.Data
.DataRow
)
7129 Private _relation
As Global.System
.Data
.DataRelation
7131 Private _childFirst
As Integer
7133 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
7134 Friend Sub New(ByVal relation
As Global.System
.Data
.DataRelation
, ByVal childFirst
As Boolean)
7136 Me._relation
= relation
7144 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
7145 Private Function IsChildAndParent(ByVal child
As Global.System
.Data
.DataRow
, ByVal parent
As Global.System
.Data
.DataRow
) As Boolean
7146 Global.System
.Diagnostics
.Debug
.Assert((Not (child
) Is
Nothing))
7147 Global.System
.Diagnostics
.Debug
.Assert((Not (parent
) Is
Nothing))
7148 Dim newParent
As Global.System
.Data
.DataRow
= child
.GetParentRow(Me._relation
, Global.System
.Data
.DataRowVersion
.[Default
])
7150 Do While ((Not (newParent
) Is
Nothing) _
7151 AndAlso ((Object.ReferenceEquals(newParent
, child
) = false) _
7152 AndAlso (Object.ReferenceEquals(newParent
, parent
) = false)))
7153 newParent
= newParent
.GetParentRow(Me._relation
, Global.System
.Data
.DataRowVersion
.[Default
])
7156 If (newParent Is
Nothing) Then
7157 newParent
= child
.GetParentRow(Me._relation
, Global.System
.Data
.DataRowVersion
.Original
)
7158 Do While ((Not (newParent
) Is
Nothing) _
7159 AndAlso ((Object.ReferenceEquals(newParent
, child
) = false) _
7160 AndAlso (Object.ReferenceEquals(newParent
, parent
) = false)))
7161 newParent
= newParent
.GetParentRow(Me._relation
, Global.System
.Data
.DataRowVersion
.Original
)
7165 If Object.ReferenceEquals(newParent
, parent
) Then
7171 <Global.System
.Diagnostics
.DebuggerNonUserCodeAttribute()> _
7172 Public Function Compare(ByVal row1
As Global.System
.Data
.DataRow
, ByVal row2
As Global.System
.Data
.DataRow
) As Integer Implements
Global.System
.Collections
.Generic
.IComparer(Of
Global.System
.Data
.DataRow
).Compare
7173 If Object.ReferenceEquals(row1
, row2
) Then
7176 If (row1 Is
Nothing) Then
7179 If (row2 Is
Nothing) Then
7183 'Is row1 the child or grandchild of row2
7184 If Me.IsChildAndParent(row1
, row2
) Then
7185 Return Me._childFirst
7188 'Is row2 the child or grandchild of row1
7189 If Me.IsChildAndParent(row2
, row1
) Then
7190 Return (-1 * Me._childFirst
)